* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #343a40;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* ── HEADER ─────────────────────────────────────────── */
.header {
    background: linear-gradient(135deg, #db2525 0%, #db2525 100%);
    color: white;
    padding: 30px;
    text-align: center;
}
.header h1 { font-size: 2.5em; margin-bottom: 10px; }
.header p  { font-size: 1.1em; opacity: 0.9; }

.btc-price-box {
    background: white;
    border-radius: 15px;
    padding: 20px 40px;
    margin: 25px auto 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 420px;
}
.price-label {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.price-czk {
    font-size: 2.5em;
    font-weight: 800;
    color: #db2525;
    line-height: 1.2;
    margin-bottom: 5px;
}
.price-usd { font-size: 1.1em; color: #999; margin-bottom: 10px; }
.price-change {
    font-size: 0.9em; font-weight: 600;
    padding: 6px 12px; border-radius: 8px; display: inline-block;
}
.price-change.positive { color: #10b981; background: #d1fae5; }
.price-change.negative { color: #ef4444; background: #fee2e2; }

.refresh-indicator {
    display: inline-block;
    animation: spin 2s linear infinite;
    opacity: 0; transition: opacity 0.3s;
}
.refresh-indicator.active { opacity: 1; }
@keyframes spin { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }

/* ── CONTENT ─────────────────────────────────────────── */
.content { padding: 30px; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── INPUTS SECTION ──────────────────────────────────── */
.inputs-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.input-group { margin-bottom: 30px; }
.input-group:last-child { margin-bottom: 0; }

.input-group.highlight {
    background: linear-gradient(135deg, #fff5e6 0%, #ffffff 100%);
    border: 2px solid #db2525;
    border-radius: 12px;
    padding: 20px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1em;
}
.input-group.highlight label {
    font-size: 1.3em;
    color: #db2525;
}

.info-icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #667eea;
    color: white; font-size: 0.75em; font-weight: bold;
    cursor: help; position: relative; flex-shrink: 0;
}
.input-group.highlight .info-icon { background: #db2525; }
.info-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute; left: 30px; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.9); color: white;
    padding: 12px 16px; border-radius: 8px;
    font-size: 0.9rem; font-weight: normal;
    z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    width: max-content; max-width: 320px; white-space: normal;
}
.info-icon:hover::before {
    content: '';
    position: absolute; left: 25px; top: 50%; transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(0,0,0,0.9); z-index: 1001;
}

.value-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.value-input {
    background: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    color: #667eea;
    font-size: 1.2em;
    border: 2px solid #e0e0e0;
    width: 160px;
    text-align: right;
    transition: all 0.3s ease;
    font-family: inherit;
    outline: none;
}
.input-group.highlight .value-input {
    font-size: 1.5em;
    color: #db2525;
    border-color: #db2525;
}
.value-input:hover { border-color: #db2525; }
.value-input:focus { border-color: #db2525; box-shadow: 0 0 0 3px rgba(219,37,37,0.1); }

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #db2525;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #db2525;
    cursor: pointer; border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slider-sub {
    font-size: 0.85em;
    color: #999;
    margin-top: 6px;
}



/* ── RESULT BOX ───────────────────────────────────────── */
.result-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}
.result-box h2 { font-size: 1.2em; margin-bottom: 10px; opacity: 0.9; }
.result-box .big-number { font-size: 3.5em; font-weight: 800; margin: 10px 0; line-height: 1; }
.result-box .sats-info { font-size: 0.95em; opacity: 0.75; margin-top: 5px; }
.result-box .sub-info   { font-size: 1.05em; opacity: 0.85; margin-top: 15px; }

.sustain-badge {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 0.95em; font-weight: 700;
}
.sustain-badge.safe    { background: rgba(16,185,129,0.25); border: 2px solid rgba(16,185,129,0.6); }
.sustain-badge.warning { background: rgba(255,255,255,0.18); border: 2px solid rgba(255,255,255,0.5); }
.sustain-badge.danger  { background: rgba(239,68,68,0.3);   border: 2px solid rgba(239,68,68,0.7); }

/* ── STATS GRID ───────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}
@media(max-width:768px){ .stats-grid{ grid-template-columns: 1fr 1fr; } }

.stat-card-header {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
}
.stat-header-title {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
    border-left: 4px solid #ddd;
    transition: border-color 0.3s;
}
.stat-card.orange { border-left-color: #db2525; }
.stat-card.purple { border-left-color: #667eea; }
.stat-card.green  { border-left-color: #10b981; }
.stat-card.red    { border-left-color: #ef4444; }

.stat-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa; font-weight: 700;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 1.3em; font-weight: 800;
    color: #333; line-height: 1.2;
}
.stat-value.orange { color: #db2525; }
.stat-value.purple { color: #667eea; }
.stat-value.green  { color: #10b981; }
.stat-value.red    { color: #ef4444; }
.stat-sub { font-size: 0.78em; color: #bbb; margin-top: 5px; }

/* ── CHART SECTION ────────────────────────────────────── */
.chart-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}
.chart-section h2 { color: #333; margin-bottom: 20px; font-size: 1.5em; }

.chart-container { position: relative; height: 400px; margin-bottom: 10px; }

/* ── TABLE ────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; font-size: 0.82em; }
th { background: #667eea; color: white; padding: 10px 8px; text-align: right; font-weight: 600; font-size: 0.85em; line-height: 1.3; }
th:first-child { text-align: center; padding-left: 10px; }
td { padding: 8px 8px; border-bottom: 1px solid #e0e0e0; text-align: right; }
td:first-child { text-align: center; font-weight: 700; padding-left: 10px; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: #f8f9fa; }
tr.row-year0   { background: #fff5e6 !important; font-weight: 600; }
tr.row-danger  { background: #fee2e2 !important; }
.positive { color: #10b981; font-weight: 600; }
.negative { color: #ef4444; font-weight: 600; }

/* ── TOGGLE SWITCH ───────────────────────────────────── */
.rolovat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    background: white;
    border-radius: 10px;
}
.rolovat-label { font-weight: 600; color: #555; font-size: 0.95em; }
.rolovat-sub   { font-size: 0.82em; color: #aaa; margin-top: 3px; }

.toggle-switch {
    position: relative;
    width: 50px; height: 26px;
    display: inline-block;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider-small {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
}
.toggle-slider-small:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .toggle-slider-small { background-color: #10b981; }
input:checked + .toggle-slider-small:before { transform: translateX(24px); }

/* ── FAQ SEKCE ───────────────────────────────────────── */
.faq-section {
    background: white;
    padding: 50px 30px;
    border-top: 1px solid #e0e0e0;
}
.faq-container { max-width: 900px; margin: 0 auto; }
.faq-section h2 {
    color: #333;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}
.faq-section details {
    background: #f8f9fa;
    padding: 20px 24px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    margin-bottom: 16px;
    transition: all 0.2s;
}
.faq-section details:hover { border-color: #db2525; }
.faq-section details[open] { border-color: #db2525; background: #fff; }
.faq-section summary {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::before {
    content: '▶';
    font-size: 0.8em;
    color: #db2525;
    transition: transform 0.2s;
}
.faq-section details[open] summary::before { transform: rotate(90deg); }
.faq-section details p {
    margin-top: 16px;
    color: #555;
    line-height: 1.7;
    font-size: 1em;
}

/* ── OBSAHOVÝ ČLÁNEK ──────────────────────────────────── */
.content-article {
    background: #f8f9fa;
    padding: 50px 30px;
    border-top: 1px solid #e0e0e0;
}
.article-container { max-width: 900px; margin: 0 auto; }
.content-article h2 {
    color: #333;
    font-size: 2em;
    margin-bottom: 24px;
}
.content-article h3 {
    color: #333;
    font-size: 1.4em;
    margin-top: 32px;
    margin-bottom: 16px;
}
.content-article p {
    color: #555;
    line-height: 1.8;
    font-size: 1.05em;
    margin-bottom: 20px;
}
.content-article ul {
    margin: 16px 0 24px 24px;
    color: #555;
    line-height: 1.8;
}
.content-article li {
    margin-bottom: 12px;
    font-size: 1.02em;
}
.content-article strong { color: #333; font-weight: 600; }

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
    background: #f8f9fa;
    border-top: 2px solid #e0e0e0;
    padding: 30px;
    text-align: center;
    color: #666;
}
.footer-content { max-width: 800px; margin: 0 auto; }
.footer-creator {
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 500;
}
.footer-creator strong { color: #333; }
.footer-privacy {
    font-size: 0.95em;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.privacy-icon { font-size: 1.2em; }

@media(max-width:768px){
    .header h1 { font-size: 1.8em; }
    .result-box .big-number { font-size: 2.5em; }
    .value-input { font-size: 1em; width: 130px; }
    .input-group.highlight .value-input { font-size: 1.2em; width: 150px; }
}
