/* ============================================
   TIME THIEF CALCULATOR — RDU YOUTH
   Labour Day 2026
   ============================================ */

:root {
    --rdu-red: #E31937;
    --rdu-dark: #003366;
    --climate-green: #2E8B57;
    --alarm-orange: #FF6B35;
    --bg-cream: #FAF9F6;
    --text-dark: #1a1a1a;
    --text-muted: #666;
    --border-light: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--rdu-red);
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--rdu-red);
    letter-spacing: -0.5px;
}

.theme-badge {
    background: var(--alarm-orange);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-light);
    z-index: 0;
}

.progress-step {
    background: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 2px solid var(--border-light);
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.progress-step.active {
    background: var(--rdu-red);
    color: white;
    border-color: var(--rdu-red);
}

.progress-step.completed {
    background: var(--climate-green);
    color: white;
    border-color: var(--climate-green);
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.5s;
    flex: 1;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2,
h3 {
    color: var(--rdu-dark);
    margin-bottom: 10px;
    line-height: 1.2;
}

h1 {
    font-size: 1.8rem;
    font-weight: 800;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

input[type="number"],
input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'JetBrains Mono', monospace;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--rdu-red);
}

.hint {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sliders */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-light);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 15px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--rdu-red);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--rdu-red);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
}

.slider-value {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--rdu-red);
    margin: 10px 0;
}

/* Checkboxes */
.checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;
}

.checkbox-label.large {
    font-size: 1.1rem;
    font-weight: 600;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input:checked+.checkmark {
    background: var(--rdu-red);
    border-color: var(--rdu-red);
}

.checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.checkbox-label input:checked+.checkmark::after {
    opacity: 1;
}

.pledge-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 5px;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-telegram,
.btn-whatsapp,
.btn-petition,
.btn-print {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--rdu-red);
    color: white;
    flex: 1;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: #c41230;
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-primary.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(227, 25, 55, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(227, 25, 55, 0);
    }
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--rdu-red);
    color: var(--rdu-red);
}

.btn-telegram {
    background: #0088cc;
    color: white;
    width: 100%;
    margin-bottom: 10px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    width: 100%;
    margin-bottom: 10px;
}

.btn-petition {
    background: var(--alarm-orange);
    color: white;
    width: 100%;
}

.btn-print {
    background: var(--rdu-dark);
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
}

/* Comparison Box */
.comparison-box {
    background: #f0f4f8;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    border-left: 4px solid var(--alarm-orange);
}

.stat .number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--alarm-orange);
    display: block;
}

.stat .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alarm Box */
.alarm-box {
    background: linear-gradient(135deg, var(--alarm-orange), #ff8c5a);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
    animation: flash 2s infinite;
}

@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.9;
    }
}

.alarm-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.alarm-text {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Results */
.results-container {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.result-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--border-light);
}

.result-card.urgent {
    border-top-color: var(--alarm-orange);
    background: #fff5f0;
}

.result-card.critical {
    border-top-color: var(--rdu-red);
    background: #fff0f3;
}

.result-card.highlight {
    border-top-color: var(--climate-green);
    background: #f0f9f4;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.result-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--rdu-dark);
    line-height: 1;
}

.result-unit {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Visualization */
.visualization {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.visualization h3 {
    font-size: 1rem;
    margin-bottom: 15px;
}

.time-blocks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.block {
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.block.sleep {
    background: #e3f2fd;
    color: #1565c0;
}

.block.work {
    background: #fff3e0;
    color: #e65100;
}

.block.stolen {
    background: var(--rdu-red);
    color: white;
    animation: pulse 2s infinite;
}

.block.remaining {
    background: #e8f5e9;
    color: #2e7d32;
}

.week-total {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Bar Chart */
.comparison-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.comparison-section h3 {
    font-size: 1rem;
    margin-bottom: 15px;
}

.bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.bar-label {
    width: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

.bar {
    flex: 1;
    height: 24px;
    background: var(--border-light);
    border-radius: 12px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #90a4ae;
    border-radius: 12px;
    transition: width 1s ease-out;
}

.bar-item.you .bar-fill {
    background: var(--rdu-red);
}

.bar-value {
    width: 90px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

.bar-item.you .bar-value {
    color: var(--rdu-red);
    font-weight: 700;
}

/* Policy Cards */
.policy-cards {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.policy-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--climate-green);
    transition: transform 0.3s;
}

.policy-card:hover {
    transform: translateX(5px);
}

.policy-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.policy-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.policy-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.policy-impact {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--climate-green);
}

/* ROI Calculator */
.roi-calculator {
    background: linear-gradient(135deg, var(--rdu-dark), #004080);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.roi-calculator h3 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.roi-grid {
    display: grid;
    gap: 15px;
}

.roi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.roi-item.highlight {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-bottom: none;
    margin-top: 10px;
}

.roi-label {
    font-size: 0.9rem;
}

.roi-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
}

.roi-item.highlight .roi-value {
    color: #ffd700;
    font-size: 1.5rem;
}

/* Testimonial */
.testimonial {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid var(--climate-green);
}

.testimonial blockquote {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.6;
}

.testimonial cite {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: normal;
    font-weight: 600;
}

/* Action Section */
.action-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.action-section h3 {
    text-align: center;
    margin-bottom: 20px;
}

.action-buttons {
    margin-bottom: 20px;
}

.pledge-box {
    background: #f0f9f4;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid var(--climate-green);
}

/* Print Section */
.print-section {
    text-align: center;
    margin-bottom: 20px;
}

.print-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.restart-section {
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-btn:hover {
    color: var(--rdu-red);
}

/* Printable Statement */
@media print {
    body * {
        visibility: hidden;
    }

    #printable-statement,
    #printable-statement * {
        visibility: visible;
    }

    #printable-statement {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 40px;
        display: block !important;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .result-value {
        font-size: 1.8rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-secondary {
        width: 100%;
    }
}

/* Chart Tabs */
.chart-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.chart-tab-btn {
    padding: 8px 14px;
    border: 2px solid var(--border-light);
    border-radius: 20px;
    background: white;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.chart-tab-btn:hover {
    border-color: var(--rdu-red);
    color: var(--rdu-red);
}

.chart-tab-btn.active {
    background: var(--rdu-red);
    color: white;
    border-color: var(--rdu-red);
}

/* Chart Panels */
.chart-panel {
    display: none;
}

.chart-panel.active {
    display: block;
    animation: fadeIn 0.4s;
}

.chart-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    height: 420px;
}

.chart-container-tall {
    height: 620px;
}

.chart-legend-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.chart-callout {
    background: #fff3e0;
    border-left: 4px solid var(--alarm-orange);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* Summary Infographic */
.summary-infographic {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 25px;
}

.summary-infographic h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid var(--rdu-dark);
}

.info-card.highlight-green {
    border-left-color: var(--climate-green);
    background: #f0f9f4;
}

.info-card.highlight-red {
    border-left-color: var(--rdu-red);
    background: #fff0f3;
}

.info-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.info-card h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--rdu-dark);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card ul li {
    font-size: 0.82rem;
    color: var(--text-dark);
    margin-bottom: 4px;
    padding-left: 10px;
    position: relative;
}

.info-card ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .chart-container {
        height: 350px;
        padding: 10px;
    }

    .chart-container-tall {
        height: 500px;
    }

    .chart-tab-btn {
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Chart References */
.chart-reference {
    font-size: 0.72rem;
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 8px 12px;
    margin-top: 6px;
    margin-bottom: 10px;
    border-top: 1px solid #eee;
    line-height: 1.5;
}

.chart-reference a {
    color: #999;
    text-decoration: underline;
    transition: color 0.2s;
}

.chart-reference a:hover {
    color: var(--rdu-red);
}

/* Utility */
.hidden {
    display: none !important;
}