/* ===== CSS Variables - Burgundy & White Theme ===== */
:root {
    --primary: #722F37;
    --primary-dark: #5A1E26;
    --primary-light: #8B3D47;
    --accent: #8B0000;
    --bg-main: #FFFFFF;
    --bg-secondary: #F8F8F8;
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-light: #6A6A6A;
    --border-color: #E0E0E0;
    --success: #2E7D32;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ===== Base Reset ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Prompt', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Header / Navbar ===== */
.navbar {
    background: var(--primary);
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.navbar-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.navbar-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Main Container ===== */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

/* ===== Survey Intro ===== */
.intro-section {
    text-align: center;
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.intro-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ===== Intro Cover Image ===== */
.intro-cover-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 16px;
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: var(--shadow-lg);
}

.intro-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.intro-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.start-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.9rem 2.5rem;
    border-radius: 30px;
    font-family: 'Prompt', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.start-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Question Card ===== */
.question-section {
    display: none;
    padding: 1.5rem 0;
}

.question-section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.question-progress {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.progress-dot {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.progress-dot.completed {
    background: var(--success);
}

.progress-dot.current {
    background: var(--primary);
}

.question-number {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.question-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ===== Question Image ===== */
.question-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    margin: 0 auto 1.2rem;
    display: block;
    box-shadow: var(--shadow);
}

/* ===== Result Image ===== */
.result-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: block;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--primary);
}

/* ===== Options ===== */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    text-align: left;
    font-family: 'Prompt', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.option-number {
    background: var(--primary);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    line-height: 1.4;
}

.option-btn:hover {
    border-color: var(--primary);
    background: #FFF5F5;
}

.option-btn.selected {
    border-color: var(--primary);
    background: #FFF0F0;
}

/* ===== Results Section ===== */
.results-section {
    display: none;
    padding: 1.5rem 0;
}

.results-section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.result-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.result-type {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== Score Display ===== */
.score-display {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.3rem;
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
}

.score-max {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* ===== View Scoreboard Button ===== */
.view-scoreboard-btn {
    display: block;
    width: 100%;
    background: var(--bg-secondary);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 1rem;
    border-radius: 12px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.view-scoreboard-btn:hover {
    background: var(--primary);
    color: white;
}

/* ===== Share Buttons ===== */
.share-section {
    margin-top: 1.5rem;
    text-align: center;
}

.share-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-fb {
    background: #1877F2;
}

.share-x {
    background: #000;
}

.share-line {
    background: #00B900;
}

.share-copy {
    background: var(--text-light);
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    margin: 1rem;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: var(--primary-dark);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== Scoreboard Page ===== */
.scoreboard-header {
    text-align: center;
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.your-score-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.your-score-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.your-score-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.your-score-type {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ===== National Score ===== */
.national-score-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.national-score-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.national-score-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.national-respondents {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* ===== Question Stats ===== */
.question-stats {
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.stat-question {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.stat-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-option-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-bar-container {
    flex: 2;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 1s ease-out;
}

.stat-count {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 55px;
    text-align: right;
}

.stat-percent {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 45px;
    text-align: right;
}

/* ===== Support Section ===== */
.support-section {
    background: #FFF8F0;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid #FFE4CC;
}

.support-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.support-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.support-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.support-image {
    width: 100%;
    max-width: 250px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.support-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.support-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #FF6B35;
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.support-btn.cat {
    background: #5C7AEA;
    box-shadow: 0 2px 10px rgba(92, 122, 234, 0.3);
}

.support-btn.cat:hover {
    box-shadow: 0 4px 15px rgba(92, 122, 234, 0.4);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-light);
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

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

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

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }

    .intro-title {
        font-size: 1.8rem;
    }

    .question-text {
        font-size: 1.3rem;
    }

    .option-btn {
        padding: 1.2rem 1.5rem;
    }
}