/* =====================================================
   CompoundCalc.online — CSS
   Fonts: Syne (display) + Inter (body)
   ===================================================== */

:root {
    --bg:        #0a0f1a;
    --surface:   #111827;
    --surface-2: #1a2235;
    --text:      #f0f4ff;
    --text-muted:#6b7280;
    --text-sub:  #9ca3af;
    --accent:    #00e5b0;
    --accent-dim:rgba(0,229,176,0.1);
    --accent2:   #3b82f6;
    --border:    #1e2d45;
    --border-lt: #263548;
    --success:   #10b981;
    --danger:    #f43f5e;
    --radius:    16px;
    --radius-sm: 10px;
    --shadow:    0 4px 30px rgba(0,0,0,0.4);
}

[data-theme="light"] {
    --bg:        #f0f5ff;
    --surface:   #ffffff;
    --surface-2: #f7faff;
    --text:      #0d1117;
    --text-muted:#6b7280;
    --text-sub:  #9ca3af;
    --accent:    #00a07a;
    --accent-dim:rgba(0,160,122,0.1);
    --accent2:   #2563eb;
    --border:    #dde5f0;
    --border-lt: #c8d5e8;
    --shadow:    0 4px 24px rgba(0,0,0,0.07);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 12px 48px;
    transition: background 0.25s, color 0.25s;
}

/* ── Ad Slots ── */
.ad-slot {
    width: 100%; max-width: 800px;
    min-height: 90px;
    background: var(--surface-2);
    border: 1px dashed var(--border-lt);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    margin: 10px 0;
}
.ad-slot.mid-ad { margin: 16px 0; }
.ad-label {
    position: absolute; top: 4px; left: 8px;
    font-size: 9px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .08em;
}

/* ── Theme ── */
.theme-btn {
    position: fixed; bottom: 20px; right: 20px; z-index: 1000;
    display: flex; align-items: center; gap: 6px;
    background: var(--surface); border: 1px solid var(--border-lt);
    color: var(--text); padding: 9px 16px; border-radius: 50px;
    cursor: pointer; font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 600;
    box-shadow: var(--shadow);
    transition: border-color 0.2s, transform 0.15s;
    white-space: nowrap;
}
.theme-btn:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ── Container ── */
.container { width: 100%; max-width: 860px; }

/* ── Header ── */
header { text-align: center; padding: 28px 0 16px; }
.logo-wrap {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-bottom: 8px;
}
h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 800; letter-spacing: -0.5px;
}
h1 .domain { color: var(--accent); }
.tagline { font-size: 13px; color: var(--text-muted); }

/* ── Calculator Layout ── */
.calc-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (min-width: 700px) {
    .calc-section { grid-template-columns: 340px 1fr; }
}

.panel-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem; font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── Inputs Panel ── */
.inputs-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.input-group { margin-bottom: 18px; }
.input-group label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--text-muted); margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: 0.05em;
}

.input-wrap {
    display: flex; align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s;
}
.input-wrap:focus-within { border-color: var(--accent); }

.prefix, .suffix {
    padding: 0 12px;
    font-size: 14px; font-weight: 600;
    color: var(--accent);
    background: var(--accent-dim);
    height: 44px; display: flex; align-items: center;
    white-space: nowrap;
}

.input-wrap input {
    flex: 1; border: none; background: transparent;
    color: var(--text); padding: 0 12px;
    font-family: 'Syne', sans-serif;
    font-size: 16px; font-weight: 700;
    height: 44px; outline: none;
    -moz-appearance: textfield;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }

select {
    width: 100%; padding: 0 12px; height: 44px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px; font-weight: 500;
    outline: none; cursor: pointer;
    transition: border-color 0.2s;
}
select:focus { border-color: var(--accent); }

/* Slider */
.slider {
    width: 100%; margin-top: 8px;
    -webkit-appearance: none; appearance: none;
    height: 4px; border-radius: 2px;
    background: var(--border); outline: none; cursor: pointer;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent); cursor: pointer;
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.slider::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent); cursor: pointer; border: none;
}

/* ── Results Panel ── */
.results-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.result-hero {
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 14px;
    display: flex; flex-direction: column; gap: 4px;
}
.result-label {
    font-size: 11px; font-weight: 600; color: var(--accent);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.result-value {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800; color: var(--accent);
    letter-spacing: -1px;
}

.result-cards {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 10px; margin-bottom: 16px;
}
.result-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}
.result-card.accent { border-color: var(--accent); background: var(--accent-dim); }
.rc-label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.rc-value {
    display: block; font-family: 'Syne', sans-serif;
    font-size: 1.1rem; font-weight: 700; color: var(--text);
}
.result-card.accent .rc-value { color: var(--accent); }

/* ── Chart ── */
.chart-wrap {
    width: 100%; height: 200px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 8px;
}
#growth-chart { width: 100%; height: 100%; display: block; }

.chart-legend {
    display: flex; gap: 16px; justify-content: center;
    font-size: 12px; color: var(--text-muted);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot {
    width: 10px; height: 10px; border-radius: 2px;
}
.legend-dot.interest { background: var(--accent); }
.legend-dot.deposited { background: var(--border-lt); }

/* ── Table ── */
.table-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap; gap: 10px;
}
.section-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.export-btn {
    background: transparent; border: 1px solid var(--border-lt);
    color: var(--text-muted); padding: 6px 14px;
    border-radius: var(--radius-sm); cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
    transition: all 0.15s;
}
.export-btn:hover { border-color: var(--accent); color: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
    text-align: right; padding: 8px 12px;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.05em; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
thead th:first-child { text-align: left; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 9px 12px; }
tbody td.num { text-align: right; font-family: 'Syne', monospace; font-weight: 600; }
tbody td.accent-text { color: var(--accent); }

/* ── About / SEO ── */
.about-section {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); margin-bottom: 20px;
    color: var(--text-muted); font-size: 14px; line-height: 1.75;
}
.about-section h3 {
    font-family: 'Syne', sans-serif; font-size: 1rem;
    color: var(--text); margin-bottom: 10px; font-weight: 700;
}
.about-section p { margin-bottom: 10px; }
.about-section strong { color: var(--text); }

.faq { margin-top: 20px; }
.faq h3 { margin-bottom: 12px; }
details {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    margin-bottom: 8px; overflow: hidden;
}
summary {
    padding: 11px 14px; cursor: pointer;
    font-weight: 500; font-size: 13px; color: var(--text);
    list-style: none; display: flex; justify-content: space-between; align-items: center;
    background: var(--surface-2);
}
summary::after { content: '+'; font-size: 16px; color: var(--text-muted); }
details[open] summary::after { content: '−'; }
details p {
    padding: 12px 14px; font-size: 13px;
    background: var(--surface); border-top: 1px solid var(--border); margin: 0;
}

/* ── Footer ── */
footer {
    text-align: center; padding: 20px 0 0;
    border-top: 1px solid var(--border);
    font-size: 12px; color: var(--text-muted);
}
footer nav {
    margin-top: 8px; display: flex; justify-content: center;
    gap: 10px; flex-wrap: wrap;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .theme-btn { bottom: 14px; right: 14px; }
    .result-cards { grid-template-columns: 1fr; }
    .chart-wrap { height: 160px; }
}
/* ── Tool Cards (calculator links) ── */
.tool-card-link { text-decoration: none; }
.tool-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.tool-card:hover { border-color: var(--accent); background: var(--accent-dim); }
.tool-card-icon { font-size: 22px; margin-bottom: 6px; }
.tool-card-title { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.tool-card-desc { font-size: 12px; color: var(--text-muted); }

/* ── Nav breadcrumb ── */
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
