/* CSS Variables & Reset */
:root {
    --navy: #0D2B52;
    --navy-dark: #07172C;
    --gold: #FFC72C;
    --gold-hover: #E5B227;
    --white: #FFFFFF;
    --cream: #F9FAFB;
    --cream-dark: #E5E7EB;
    --gray-light: #E5E7EB;
    --gray-dark: #4B5563;
    --text-main: #1F2937;
    --success: #10B981;
    --error: #EF4444;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.hidden { display: none !important; }
.relative { position: relative; }
.z-10 { position: relative; z-index: 10; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-sm { margin-bottom: 1rem; }
.mt-sm { margin-top: 1rem; }
.mt-lg { margin-top: 2rem; }

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

#app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.screen {
    flex: 1;
    animation: fadeIn 0.4s ease-out;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.2;
    color: var(--navy);
}

/* Status Banner */
#status-banner {
    background: var(--navy);
    color: var(--white);
    padding: 15px 0;
    text-align: center;
    font-weight: 600;
}

/* Buttons */
button {
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--gold);
    color: var(--navy);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 99px;
    padding: 18px 40px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 199, 44, 0.4);
}

.btn-primary:hover {
    background-color: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 199, 44, 0.5);
}

.btn-primary:disabled {
    background-color: var(--gray-dark);
    color: var(--white);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-large {
    font-size: 1.25rem;
    padding: 20px 48px;
}

.btn-full {
    width: 100%;
    padding: 18px 24px;
}

.btn-secondary {
    background-color: var(--navy);
    color: var(--white);
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 24px;
}

.btn-secondary:hover {
    background-color: var(--navy-dark);
}

/* === START SCREEN === */
#start-screen {
    display: flex;
    flex-direction: column;
}

.hero-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
}

.hero-img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.star-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
}
.star-divider::before,
.star-divider::after {
    content: '';
    height: 1px;
    width: 60px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 15px;
}
.star-icon {
    color: var(--gold);
}


.brand-bar {
    background-color: var(--navy);
    color: var(--gold);
    padding: 16px 0;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.start-action-bar {
    background-color: var(--cream);
    padding: 30px 20px;
    margin-top: auto;
}

/* === QUIZ SCREEN === */
.quiz-container {
    padding-top: 60px;
    padding-bottom: 60px;
}

.quiz-header {
    margin-bottom: 30px;
}

.progress-wrapper {
    background: var(--white);
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--cream-dark);
}

.progress-text {
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-bar-bg {
    height: 8px;
    background-color: var(--cream);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--gold);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(13, 43, 82, 0.08);
    border: 1px solid var(--cream-dark);
    position: relative;
    overflow: hidden;
}

/* Subtle corner accent */
.question-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: var(--cream-dark);
    transform: rotate(45deg);
    opacity: 0.3;
}

.question-text {
    font-size: 1.6rem;
    color: var(--navy);
    margin-bottom: 32px;
    line-height: 1.4;
}

.answers-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.answer-btn {
    background: var(--white);
    border: 2px solid var(--cream-dark);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.answer-btn:hover {
    border-color: var(--navy);
    background: rgba(13, 43, 82, 0.02);
    transform: translateX(4px);
}

/* Inline feedback styling */
.answer-btn.correct {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: #065F46;
}
.answer-btn.correct::after {
    content: '✓';
    margin-left: auto;
    color: var(--success);
    font-weight: 900;
}

.answer-btn.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: #991B1B;
}
.answer-btn.incorrect::after {
    content: '✗';
    margin-left: auto;
    color: var(--error);
    font-weight: 900;
}


/* === FORM SCREEN === */
.form-container {
    padding-top: 60px;
    padding-bottom: 60px;
    max-width: 600px;
}

.form-header { margin-bottom: 40px; }
.form-headline { font-size: 2.5rem; margin-bottom: 12px; }
.form-subhead { font-size: 1.1rem; color: var(--gray-dark); margin-bottom: 24px; }

.prize-image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 4px solid var(--white);
}

.prize-image {
    width: 100%;
    height: auto;
    display: block;
}

.form-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(13, 43, 82, 0.08);
    border: 1px solid var(--cream-dark);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--cream-dark);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: var(--cream);
}

.form-group input:focus {
    outline: none;
    border-color: var(--navy);
    background-color: var(--white);
}

.error-message {
    background: #FEF2F2;
    color: var(--error);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #FCA5A5;
    font-weight: 600;
    text-align: center;
}

/* === RESULT SCREEN === */
.result-container {
    padding-top: 60px;
    padding-bottom: 60px;
    max-width: 700px;
}

.score-card {
    background: var(--navy);
    color: var(--white);
    border-radius: 24px;
    padding: 50px 30px;
    box-shadow: 0 20px 40px rgba(13, 43, 82, 0.2);
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern in score card */
.score-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image: radial-gradient(var(--navy-dark) 2px, transparent 2px);
    background-size: 20px 20px;
    opacity: 0.2;
    pointer-events: none;
}

.result-title {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.score-display {
    font-family: var(--font-heading);
    font-weight: 900;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.score-value {
    font-size: 5rem;
    color: var(--gold);
    line-height: 1;
}

.score-separator {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.4);
    margin: 0 10px;
}

.score-total {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.8);
}

.result-desc {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 10;
}

.referral-card {
    background: var(--white);
    border: 2px dashed var(--gold);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
}

.referral-card h3 { margin-bottom: 10px; font-size: 1.4rem; }
.referral-card p { margin-bottom: 20px; color: var(--gray-dark); }

.share-box {
    display: flex;
    gap: 10px;
}

.share-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--cream-dark);
    border-radius: 8px;
    background: var(--cream);
    font-size: 1rem;
    color: var(--text-main);
}

.review-section {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--cream-dark);
}

.review-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--cream-dark);
    padding-bottom: 15px;
}

.review-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--cream-dark);
}
.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.review-q {
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.review-answer {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.review-answer.correct {
    background: rgba(16, 185, 129, 0.1);
    color: #065F46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.review-answer.correct::before {
    content: '✓';
    margin-right: 10px;
    font-weight: 900;
    color: var(--success);
}

.review-answer.incorrect {
    background: rgba(239, 68, 68, 0.1);
    color: #991B1B;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.review-answer.incorrect::before {
    content: '✗';
    margin-right: 10px;
    font-weight: 900;
    color: var(--error);
}

/* Footer Slot Styling */
#wbx-powered-by-slot {
    margin-top: auto;
    padding: 30px 20px;
}

/* Responsive */
@media (max-width: 768px) {
    
    .question-card, .form-card, .score-card, .review-section {
        padding: 24px;
        border-radius: 16px;
    }
    
    .question-text { font-size: 1.3rem; }
    
    .btn-large { width: 100%; padding: 16px 24px; }
    
    .share-box { flex-direction: column; }
    .share-box button { width: 100%; }
    
    .start-action-bar { padding: 20px 15px; }
}
