/* ===== CSS Variables ===== */
:root {
    --color-primary: #1a472a;
    --color-primary-light: #2d6a4f;
    --color-primary-dark: #0d2818;
    --color-accent: #ffd60a;
    --color-accent-hover: #ffc107;
    --color-bg: #0a1f13;
    --color-card: #132a1c;
    --color-card-hover: #1a3d27;
    --color-text: #ffffff;
    --color-text-muted: #a3b18a;
    --color-success: #40916c;
    --color-gradient-1: linear-gradient(135deg, #1a472a 0%, #2d6a4f 50%, #40916c 100%);
    --color-gradient-2: linear-gradient(180deg, #0a1f13 0%, #1a472a 100%);
    --color-gradient-accent: linear-gradient(135deg, #ffd60a 0%, #ff9f1c 100%);

    --font-family: 'Prompt', sans-serif;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Page System ===== */
.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: flex;
    flex-direction: column;
}

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

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

/* ===== Cover Page ===== */
#cover-page {
    position: relative;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.cover-bg {
    position: absolute;
    inset: 0;
    background: var(--color-gradient-2);
    z-index: -2;
}

.cover-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%232d6a4f' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='8' fill='none' stroke='%232d6a4f' stroke-width='0.5'/%3E%3Cline x1='50' y1='10' x2='50' y2='90' stroke='%232d6a4f' stroke-width='0.3'/%3E%3Cline x1='10' y1='50' x2='90' y2='50' stroke='%232d6a4f' stroke-width='0.3'/%3E%3C/svg%3E");
    background-size: 200px;
    opacity: 0.15;
    animation: fieldMove 20s linear infinite;
}

@keyframes fieldMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 200px 200px;
    }
}

.cover-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
    padding: 20px;
}

.cover-hero {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 24px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 214, 10, 0.2);
    animation: heroFloat 3s ease-in-out infinite;
}

.cover-hero img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.cover-hero:hover img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 0%,
            transparent 50%,
            rgba(10, 31, 19, 0.8) 100%);
    pointer-events: none;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.logo-badge {
    width: 100px;
    height: 100px;
    background: var(--color-gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 214, 10, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.logo-icon {
    font-size: 48px;
}

.cover-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #a3b18a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cover-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.8;
}

.team-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.mini-badge {
    width: 40px;
    height: 40px;
    background: var(--color-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid var(--color-primary-light);
    transition: var(--transition);
}

.mini-badge:hover {
    transform: scale(1.1);
    border-color: var(--color-accent);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: var(--color-gradient-accent);
    color: var(--color-primary-dark);
    border: none;
    border-radius: 50px;
    font-family: var(--font-family);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md), 0 0 30px rgba(255, 214, 10, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 214, 10, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.4rem;
    transition: var(--transition);
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.cover-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    opacity: 0.8;
}

/* ===== Quiz Page ===== */
#quiz-page {
    background: var(--color-gradient-2);
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    margin-bottom: 20px;
}

.btn-back {
    width: 44px;
    height: 44px;
    background: var(--color-card);
    border: 2px solid var(--color-primary-light);
    border-radius: 50%;
    color: var(--color-text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-back:hover {
    background: var(--color-card-hover);
    border-color: var(--color-accent);
    transform: scale(1.05);
}

.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--color-card);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 10%;
    background: var(--color-gradient-accent);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 40px;
}

.quiz-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.question-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--color-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.question-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 24px;
    text-align: center;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-btn {
    padding: 16px 20px;
    background: var(--color-card);
    border: 2px solid var(--color-primary-light);
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.choice-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--color-accent);
    transform: scaleY(0);
    transition: var(--transition);
}

.choice-btn:hover {
    background: var(--color-card-hover);
    border-color: var(--color-accent);
    transform: translateX(4px);
}

.choice-btn:hover::before {
    transform: scaleY(1);
}

.choice-btn.selected {
    background: var(--color-primary-light);
    border-color: var(--color-accent);
}

.choice-btn.selected::before {
    transform: scaleY(1);
}

/* ===== Result Page ===== */
#result-page {
    background: var(--color-gradient-2);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    margin-bottom: 20px;
}

.result-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.result-content {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 40px;
}

.result-card {
    background: var(--color-card);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--color-primary-light);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-gradient-accent);
}

.team-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    padding: 8px;
    box-shadow: var(--shadow-md);
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.team-tagline {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.result-description {
    background: var(--color-card);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
}

.result-description h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-accent);
}

.result-description p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.result-traits {
    background: var(--color-card);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.result-traits h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-accent);
}

.traits-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trait-tag {
    padding: 8px 16px;
    background: var(--color-primary-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    background: var(--color-gradient-accent);
    color: var(--color-primary-dark);
    border: none;
    border-radius: 50px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    padding: 16px 24px;
    background: var(--color-card);
    color: var(--color-text);
    border: 2px solid var(--color-primary-light);
    border-radius: 50px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--color-card-hover);
    border-color: var(--color-accent);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .cover-title {
        font-size: 1.7rem;
    }

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

    .team-name {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .page {
        padding: 40px;
    }

    .cover-title {
        font-size: 2.5rem;
    }

    .question-text {
        font-size: 1.5rem;
    }
}
/* ===== Recommended Quiz ===== */
.recommended-quiz {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: center;
}

.recommended-quiz h3 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.promo-banner {
    display: block;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promo-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 50, 0, 0.3);
}

.promo-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Story Share Button ===== */
.story-share-container {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.btn-story-share {
    background: linear-gradient(135deg, #E1306C 0%, #C13584 50%, #833AB4 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(193, 53, 132, 0.4);
    width: 100%;
    justify-content: center;
    max-width: 300px;
}

.btn-story-share:active {
    transform: scale(0.98);
}

.btn-story-share:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* ===== Cover Promo Adjustment ===== */
.cover-promo {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 320px; /* Limit width on cover for better layout */
    margin-left: auto;
    margin-right: auto;
}

.cover-promo h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    z-index: 10;
    position: relative;
}

.lang-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--primary-color);
    color: #0d0d0d;
    border-color: var(--primary-color);
    font-weight: 700;
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
