/* VARIABES & SETUP */
:root {
    --color-bg: #0a1018;
    /* Deep dark blue */
    --color-surface: #131c2a;
    --color-surface-hover: #1e2a3b;
    --color-primary: #cba052;
    /* Calcio Gold */
    --color-primary-hover: #e0b05a;
    --color-text-main: #f0f0f0;
    --color-text-sub: #a0aab8;
    --color-accent-red: #d32f2f;
    --color-accent-green: #2e7d32;

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;

    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

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

/* BACKGROUND EFFECT */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(203, 160, 82, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(0, 50, 100, 0.2), transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* LAYOUT UTILS */
.content-container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-sm);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.screen {
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
    /* hidden by default */
}

.screen.active {
    opacity: 1;
    display: block;
    animation: fadeIn 0.8s ease forwards;
}

.hidden {
    display: none !important;
}

/* TYPOGRAPHY */
h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -1px;
}

h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: var(--spacing-xs);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--color-text-sub);
    margin-bottom: var(--spacing-lg);
}

.highlight {
    color: var(--color-primary);
    font-style: italic;
}

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

.btn-primary {
    background-color: var(--color-primary);
    color: #000;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(203, 160, 82, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(203, 160, 82, 0.4);
}

.btn-secondary {
    background-color: var(--color-surface);
    color: var(--color-text-main);
    border: 1px solid var(--color-text-sub);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    margin-right: 10px;
}

.btn-secondary:hover {
    background-color: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.btn-text {
    background: none;
    color: var(--color-text-sub);
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    text-decoration: underline;
}

.btn-text:hover {
    color: var(--color-text-main);
}

/* INTRO SCREEN */
#intro-screen .logo-area {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.floating-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.concept-text {
    text-align: center;
    color: var(--color-text-sub);
    margin-bottom: 3rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

.action-area {
    text-align: center;
    margin-top: auto;
    margin-bottom: 2rem;
}

.small-note {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    margin-top: 1rem;
}

/* QUIZ SCREEN */
.quiz-header {
    margin-bottom: var(--spacing-md);
}

.progress-container {
    width: 100%;
    height: 4px;
    background-color: var(--color-surface);
    border-radius: 2px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--color-primary);
    width: 0%;
    transition: width 0.4s ease;
}

.question-count {
    color: var(--color-text-sub);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.question-card {
    margin-bottom: 2rem;
    padding: 0 var(--spacing-sm);
}

#question-text {
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.4;
}

/* OPTIONS GRID */
.options-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.option-btn {
    background-color: var(--color-surface);
    color: var(--color-text-main);
    padding: 1.5rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.option-btn:hover {
    background-color: var(--color-surface-hover);
    border-color: var(--color-primary);
    transform: translateX(5px);
}

/* For Rating (5-scale) specialized layout if needed, or just standard buttons */
.rating-container {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.rating-btn {
    flex: 1;
    text-align: center;
    padding: 1rem 0;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    font-weight: bold;
    font-family: var(--font-serif);
}

/* LOADING SCREEN */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(203, 160, 82, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 2rem;
}

.loading-text {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.loading-sub {
    color: var(--color-text-sub);
}

/* RESULTS SCREEN */
#result-screen .content-container {
    padding-top: var(--spacing-sm);
}

.result-header {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--color-text-sub);
}

.result-card {
    background: linear-gradient(145deg, var(--color-surface) 0%, #1a2533 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.result-card.main {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-top: 4px solid var(--color-primary);
}

.badge-best {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--color-primary);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.club-name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.club-description {
    font-size: 1.1rem;
    color: #fff;
    /* stand out */
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.club-intro {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--color-text-sub);
    position: relative;
    padding-left: 2.5rem;
}

.club-intro .fa-quote-left {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--color-primary);
    opacity: 0.5;
}

/* RECOMMENDATION BOX */
.recommendation-box {
    background-color: rgba(46, 125, 50, 0.1);
    /* Subtle green tint */
    border-left: 3px solid var(--color-accent-green);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.recommendation-box h3 {
    color: #81c784;
    /* Light green */
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.sub-card {
    background-color: var(--color-surface);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-card h5 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.sub-card p {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    line-height: 1.4;
}

/* PROMOTION AREA */
.promotion-area {
    margin-top: 1rem;
}

.promotion-area hr {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.promo-text {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.promo-links {
    display: flex;
    gap: 1rem;
}

.promo-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--color-surface);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-main);
    transition: all 0.2s;
}

.promo-card:hover {
    background-color: var(--color-surface-hover);
}

.promo-card i {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.promo-card div {
    display: flex;
    flex-direction: column;
}

.promo-card strong {
    font-size: 0.9rem;
}

.promo-card span {
    font-size: 0.7rem;
    color: var(--color-text-sub);
}

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

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

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

.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* NAV BUTTONS */
.quiz-nav {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 10px;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    box-sizing: border-box;
}

.nav-text-btn {
    background: none;
    border: none;
    color: var(--color-text-sub);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s;
    padding: 0.5rem;
}

.nav-text-btn:hover {
    color: var(--color-primary);
}

.nav-text-btn.hidden {
    visibility: hidden;
    /* Use visibility to keep layout space if needed, or display none. Here display none is better for layout */
    display: none;
}

/* Watermark inside card */
.watermark {
    margin-top: 1.5rem;
    text-align: right;
    font-family: var(--font-serif);
    font-size: 0.85rem;
    color: var(--color-primary);
    opacity: 0.9;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
}

/* SHARE BUTTON */
#share-btn,
#save-img-btn {
    background-color: #000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    padding: 1rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#share-btn:hover,
#save-img-btn:hover {
    background-color: #222;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

#save-img-btn {
    background-color: #333;
    /* Slightly lighter for distinction, or Keep black */
    background: linear-gradient(135deg, #333, #111);
}

/* FOOTER */
.app-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    color: var(--color-text-sub);
    font-size: 0.75rem;
    opacity: 0.7;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 480px) {
    h1 {
        font-size: 2.2rem;
    }

    .promo-links {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
    }

    #share-btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .btn-secondary {
        width: 100%;
        margin-right: 0;
    }
}