/* ===========================================
   BTC Yield Calculator — IXS Branding
   Palette: Black, White, Grey, Bitcoin Orange
   =========================================== */

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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #141414;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid #222222;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 2em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.logo sup {
    font-size: 0.5em;
    vertical-align: super;
}

h1 {
    font-size: 2.5em;
    color: #ffffff;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #999999;
}

/* Form */
.calculator-form {
    background: #1A1A1A;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #2A2A2A;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #CCCCCC;
    font-size: 1.1em;
}

.input-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #F7931A;
}

.input-group input[type="date"],
.input-group input[type="number"] {
    width: 100%;
    padding: 12px;
    background: #111111;
    border: 2px solid #333333;
    border-radius: 8px;
    font-size: 1em;
    color: #ffffff;
    transition: border-color 0.3s;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    font-size: 1.4em;
    padding: 4px;
    opacity: 0.8;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.input-group input[type="date"]:focus,
.input-group input[type="number"]:focus {
    outline: none;
    border-color: #F7931A;
    background: #1A1A1A;
}

.input-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #333333;
    outline: none;
    -webkit-appearance: none;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #F7931A;
    cursor: pointer;
}

.input-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #F7931A;
    cursor: pointer;
    border: none;
}

.input-group select {
    width: 100%;
    padding: 12px;
    background: #111111;
    border: 2px solid #333333;
    border-radius: 8px;
    font-size: 1em;
    color: #ffffff;
    cursor: pointer;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.input-group select:focus {
    outline: none;
    border-color: #F7931A;
    background: #1A1A1A;
}

.input-group select option {
    background: #141414;
    color: #ffffff;
}

#yieldDisplay {
    color: #F7931A;
    font-weight: bold;
}

/* Projection inputs */
.projection-inputs {
    margin-top: 15px;
    padding: 15px;
    background: #111111;
    border-radius: 8px;
    border: 1px solid #2A2A2A;
}

.projection-inputs label {
    font-size: 0.95em !important;
    margin-top: 12px;
}

.projection-inputs label:first-child {
    margin-top: 0;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: #F7931A;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(247, 147, 26, 0.3);
}

.btn-secondary {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: #CCCCCC;
    border: 2px solid #444444;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-secondary:hover {
    border-color: #999999;
    color: #ffffff;
}

/* Results */
.results {
    margin-top: 30px;
}

/* Disclaimer box */
.disclaimer-box {
    background: rgba(247, 147, 26, 0.08);
    border: 2px solid #F7931A;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.disclaimer-title {
    font-weight: 700;
    font-size: 1.1em;
    color: #F7931A;
    margin-bottom: 8px;
}

.disclaimer-text {
    color: #999999;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Chart */
.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 30px;
}

/* ATH Callout */
.ath-callout {
    background: rgba(247, 147, 26, 0.06);
    border-left: 4px solid #F7931A;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.ath-title {
    font-weight: 600;
    font-size: 1.2em;
    color: #F7931A;
    margin-bottom: 12px;
}

.ath-peak-item {
    padding: 12px 0;
    border-bottom: 1px solid #2A2A2A;
    color: #CCCCCC;
    font-size: 1em;
    line-height: 1.6;
}

.ath-peak-item:last-of-type {
    border-bottom: none;
}

.ath-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #F7931A;
    color: #F7931A;
    font-size: 1.1em;
}

/* Summary Stats */
.summary-stats {
    background: #1A1A1A;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #2A2A2A;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #2A2A2A;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 600;
    color: #888888;
}

.stat-value {
    font-weight: 700;
    color: #ffffff;
}

.stat-highlight {
    color: #F7931A;
}

.total-missed {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #F7931A;
}

.missed-amount {
    color: #F7931A;
    font-size: 1.5em;
}

/* Share Section */
.share-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-share {
    flex: 1;
    padding: 14px;
    background: #F7931A;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(247, 147, 26, 0.3);
}

.btn-download {
    flex: 1;
    padding: 14px;
    background: transparent;
    color: #CCCCCC;
    border: 2px solid #444444;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    border-color: #999999;
    color: #ffffff;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
    font-size: 1.3em;
    color: #F7931A;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #2A2A2A;
    color: #666666;
    font-size: 0.9em;
}

footer a {
    color: #F7931A;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

.disclaimer {
    margin-top: 10px;
    font-size: 0.8em;
    color: #555555;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1em;
    }

    .chart-container {
        height: 300px;
    }

    .calculator-form {
        padding: 20px;
    }

    .share-section {
        flex-direction: column;
    }

    .stat-row {
        flex-direction: column;
        gap: 4px;
    }

    .stat-label {
        font-size: 0.9em;
    }
}
