
/* --- Green Theme for Investment --- */
:root {
    --accent-green: #10B981;
    --accent-green-dark: #059669;
    --accent-green-light: #D1FAE5;
    --gradient-green: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --chart-profit: #34D399; /* Светло-зеленый */
    --chart-invest: #065F46; /* Темно-зеленый */
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }

.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.1fr 0.9fr; } }

/* Inputs */
.calc-inputs { gap: 24px; }
.input-group { margin-bottom: 24px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input { 
    width: 100%; padding: 14px; padding-right: 40px; 
    font-size: 18px; font-weight: 500; border: 1px solid #E5E7EB; 
    border-radius: 12px; outline: none; transition: 0.2s; 
    font-family: var(--font-main); 
}
.input-wrapper input:focus { border-color: var(--accent-green); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.suffix { position: absolute; right: 16px; color: var(--text-secondary); pointer-events: none; }
.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Range Slider */
.range-wrapper { display: flex; align-items: center; gap: 16px; }
.range-wrapper input[type=range] { flex-grow: 1; accent-color: var(--accent-green); cursor: pointer; }
.range-val { 
    display: flex; align-items: center; 
    border: 1px solid #E5E7EB; border-radius: 8px; padding: 4px 8px; 
    width: 80px; 
}
.range-val input { 
    width: 100%; border: none; outline: none; text-align: right; 
    font-weight: 700; color: var(--accent-green); padding: 0; 
}
.range-val span { margin-left: 4px; color: var(--text-secondary); }

/* Toggle Switch */
.toggle-row { display: flex; align-items: center; gap: 16px; background: #F9FAFB; padding: 16px; border-radius: 12px; border: 1px solid #E5E7EB; }
.toggle-switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #D1D5DB; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-green); }
input:checked + .slider:before { transform: translateX(20px); }
.toggle-label strong { display: block; font-size: 14px; color: var(--text-primary); }
.toggle-label span { font-size: 12px; color: var(--text-secondary); }

/* Results Card */
.card--green { background: var(--gradient-green); color: #fff; padding: 24px; border: none; }
.card--green h2 { color: rgba(255,255,255,0.9); font-size: 16px; margin-bottom: 8px; }
.main-result { font-size: 42px; font-weight: 800; line-height: 1.1; margin-bottom: 8px; }
.profit-highlight { background: rgba(0,0,0,0.15); display: inline-block; padding: 6px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 24px; }

/* Chart */
.chart-container { position: relative; height: 200px; margin-top: 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.chart-bars { display: flex; align-items: flex-end; justify-content: space-between; height: 100%; gap: 4px; }
.chart-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.8); }

.bar-group { 
    flex: 1; background: rgba(255,255,255,0.1); 
    border-radius: 4px 4px 0 0; position: relative; 
    transition: height 0.5s ease; cursor: pointer;
    min-height: 2px; /* Чтобы пустые бары были чуть видны */
}
.bar-fill { position: absolute; bottom: 0; left: 0; width: 100%; transition: height 0.5s ease; }
.bar-fill.profit { height: 100%; background: var(--chart-profit); border-radius: 4px 4px 0 0; opacity: 0.9; }
.bar-fill.invested { background: var(--chart-invest); opacity: 0.8; border-radius: 0 0 0 0; }

/* FOMO Line */
.bar-limit-line { 
    position: absolute; left: 0; width: 100%; height: 2px; 
    background: #EF4444; z-index: 10; 
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

/* Tooltip */
.bar-tooltip {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    background: #fff; color: #111827; padding: 4px 8px; border-radius: 6px;
    font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.2); margin-bottom: 6px;
    z-index: 20;
}
.bar-group:hover .bar-tooltip { opacity: 1; }

.chart-legend { display: flex; gap: 16px; justify-content: center; margin-top: 16px; font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-invested { background: var(--chart-invest); }
.dot-profit { background: var(--chart-profit); }
.dot-lost { background: #EF4444; }

/* FOMO Alert */
.fomo-alert { 
    margin-top: 24px; background: rgba(255,255,255,0.95); border-radius: 12px; padding: 12px; 
    display: flex; align-items: center; gap: 12px; color: #1F2937;
    animation: slideUp 0.3s ease-out;
}
.fomo-icon { font-size: 24px; }
.fomo-text { font-size: 13px; line-height: 1.4; }
.fomo-text strong { color: #EF4444; }

@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
