/* --- VARIABLES & THEME --- */
:root {
    /* Playful Chunk Palette */
    --bg-color: #F5F4ED;
    /* Fantasy */
    --primary-color: #100F06;
    /* Smoky Black (Text & Borders) */

    /* Accents */
    --accent-gold: #FFDA57;
    /* Light Gold */
    --accent-blue: #7DCAF6;
    /* Malibu */
    --accent-teal: #00917A;
    /* Teal */
    --accent-coral: #F47575;
    /* Light Coral */
    --accent-lavender: #A293FF;
    /* Bright Lavender */
    --accent-pink: #FFB7B2;

    /* Default Action Color */
    --action-color: var(--accent-gold);
    --action-hover: #FFC947;

    --card-bg: #FFFFFF;
    --footer-bg: var(--primary-color);
    --footer-text: #F5F4ED;

    /* Typography */
    --font-heading: 'Unbounded', cursive;
    /* Geometric/Display */
    --font-body: 'Space Grotesk', sans-serif;

    /* Shapes & Borders */
    --border-radius: 20px;
    --border-width: 3px;
    --border-color: var(--primary-color);

    --shadow: 4px 4px 0px var(--primary-color);
    --shadow-hover: 6px 6px 0px var(--primary-color);
    --shadow-active: 0px 0px 0px var(--primary-color);
}

/* --- RESET & BASE --- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Unbounded:wght@400;600;800;900&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--primary-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
    /* Fun Highlight Effect */
    background: linear-gradient(120deg, var(--accent-blue) 0%, var(--accent-blue) 100%);
    background-repeat: no-repeat;
    background-size: 100% 30%;
    background-position: 0 88%;
    display: inline-block;
    /* Wraps tightly for highlight */
    align-self: center;
    /* Helper for flex context */
    width: auto;
    max-width: 100%;
}

/* Container for centered H1 to make highlight work */
.header-title-container {
    text-align: center;
    display: block;
    width: 100%;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    font-weight: 400;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    transition: all 0.2s;
}

a:hover {
    background: var(--accent-gold);
}

/* --- LAYOUT --- */
main {
    flex: 1;
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header */
header {
    padding: 1.5rem 2rem;
    background: var(--bg-color);
    border-bottom: var(--border-width) solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary-color);
    text-transform: uppercase;
    border: none;
    /* Reset link border */
}

.logo svg {
    /* Make SVG Logo Chunky */
    stroke-width: 2px;
    stroke: var(--primary-color);
}

nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

nav ul li a {
    font-family: var(--font-heading);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: 50px;
}

nav ul li a:hover {
    background: var(--accent-teal);
    color: #fff;
    border: 2px solid var(--primary-color);
    box-shadow: 2px 2px 0px var(--primary-color);
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 5rem 2rem;
    margin-top: auto;
    border-top: var(--border-width) solid var(--primary-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-info p {
    margin-bottom: 0;
    color: #F5F4ED;
    font-size: 1rem;
    max-width: 300px;
    line-height: 1.5;
}

.tiny-text {
    font-size: 0.8rem !important;
    opacity: 0.6;
    font-family: var(--font-body) !important;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links h4 {
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
}

.footer-links a {
    color: #F5F4ED;
    border-bottom: 1px solid transparent;
    font-weight: 500;
    width: fit-content;
    opacity: 0.8;
    transition: all 0.2s;
    font-size: 1.05rem;
}

.footer-links a:hover {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
    opacity: 1;
    transform: translateX(4px);
    background: transparent;
}

@media (max-width: 900px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .footer-info {
        grid-column: 1 / -1;
        text-align: center;
        align-items: center;
    }

    .footer-info p {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-links a:hover {
        transform: none;
    }
}

/* --- COMPONENTS --- */

/* Buttons */
.btn {
    display: inline-block;
    background: var(--action-color);
    color: var(--primary-color) !important;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    border: var(--border-width) solid var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    text-align: center;
}

.btn:hover {
    background: var(--action-hover);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    border-bottom: var(--border-width) solid var(--primary-color);
    /* Maintain border */
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-active);
}

.btn:disabled {
    background: #e2e8f0;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Cards (Chunky Style) */
.card,
.test-card,
.character-card,
.result-card,
.question-card,
.breakdown-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: var(--border-width) solid var(--primary-color);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: transform 0.2s ease;
}

.card:hover,
.test-card:hover,
.character-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hover);
}

/* Specific Card Styles */
.character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
}

/* Alternating border colors / accents using nth-child would be cool, but simple for now */
.character-card:nth-child(odd) {
    background: #fff;
}

.character-card:nth-child(even) {
    background: #fff;
}

/* Individual accents via inline style or sophisticated selectors? 
   Let's use a subtle "top bar" style or just keep it clean. */

.char-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: var(--border-width) solid var(--primary-color);
    background: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.character-card h3 {
    background: var(--accent-lavender);
    padding: 0.2rem 0.8rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transform: rotate(-2deg);
    display: inline-block;
}

/* Grids */
/* Grids */
.character-grid,
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* Question Bento / Chunky Box */
.question-card {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    text-align: center;
    background: #fff;
}

.question-text {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

/* Chunky Options */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Stacked look like the "Pick Game" image? Or Grid? */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Responsive grid for options if wide screen */
/* Responsive grid - keeping 1 column as requested */
@media(min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

.btn-option {
    width: 100%;
    text-align: left;
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    border: var(--border-width) solid var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

.btn-option:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--primary-color);
    background: var(--primary-color);
    /* User says it's black, so let's match that aesthetic */
    border-color: var(--primary-color);
    color: #ffffff !important;
    /* Force white text to be visible */
}

.btn-option.selected {
    background: var(--accent-teal);
    color: white;
    box-shadow: 2px 2px 0px var(--primary-color);
    transform: translate(2px, 2px);
}

/* Nav Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--primary-color);
}

/* Results Page */
.result-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
}

.result-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: var(--border-width) solid var(--primary-color);
    margin-bottom: 1.5rem;
    background: var(--accent-gold);
}

.result-card h1 {
    display: block;
    background: none;
    /* Reset highlight for result title */
    margin-bottom: 0.5rem;
}

.chart-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.pie-chart {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    position: relative;
    border: var(--border-width) solid var(--primary-color);
}

.pie-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: #fff;
    border-radius: 50%;
    border: var(--border-width) solid var(--primary-color);
}

/* FAQs */
.faq-container details {
    background: #fff;
    border: var(--border-width) solid var(--primary-color);
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.faq-container details[open] {
    box-shadow: var(--shadow);
}

.faq-container summary {
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 4rem;
}

.faq-container summary::-webkit-details-marker {
    display: none;
}

.faq-container summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--accent-coral);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-container details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
    background: var(--accent-lavender);
}

.faq-container details p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    margin: 0;
    border-top: 2px dashed rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    margin-left: auto;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 4px;
    /* Chunky lines */
    background: var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-content {
        justify-content: space-between;
    }

    .main-nav {
        display: none;
        /* Hide default first */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        padding: 2rem;
        border-bottom: var(--border-width) solid var(--primary-color);
        z-index: 100;
        box-shadow: 0 10px 0 rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
        /* Show simply */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .main-nav ul li a {
        display: block;
        width: 100%;
        text-align: center;
    }

    h1 {
        font-size: 2.5rem;
    }

    .question-text {
        font-size: 1.6rem;
    }
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 5rem;
    background: #fff;
    padding: 3rem;
    border: var(--border-width) solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    background: none;
    /* Override default inline highlight for clean hero text */
    text-align: left;
    display: block;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    border: var(--border-width) solid var(--primary-color);
    box-shadow: 8px 8px 0px var(--accent-teal);
    transition: transform 0.3s ease;
}

.hero-img:hover {
    transform: rotate(2deg) scale(1.02);
}

/* Responsive Hero */
@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h1 {
        text-align: center;
        font-size: 2.2rem;
    }
}


/* Chart Legend (Playful Chunk Style) */
.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.legend-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: var(--border-width) solid var(--primary-color);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0px var(--primary-color);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 0.8rem;
    border: 2px solid var(--primary-color);
}

@media (max-width: 768px) {
    .footer-main {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* --- UTILITIES --- */
.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mt-4 {
    margin-top: 4rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

.text-center {
    text-align: center;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.bg-accent {
    background-color: var(--accent-blue) !important;
    color: var(--primary-color);
}

.bg-gold {
    background-color: var(--accent-gold) !important;
    color: var(--primary-color);
}

.bg-teal {
    background-color: var(--accent-teal) !important;
    color: #fff;
}

.bg-coral {
    background-color: var(--accent-coral) !important;
    color: #fff;
}

.bg-lavender {
    background-color: var(--accent-lavender) !important;
    color: var(--primary-color);
}

.bg-light {
    background-color: #fff !important;
}

/* List Styles */
main ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

main ul li {
    margin-bottom: 0.5rem;
}


@media (max-width: 768px) {
    .logo {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .logo-img {
        width: 32px;
        height: 32px;
    }
}


/* Language Switcher */
.lang-switcher select {
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem;
    font-family: var(--font-body);
    font-weight: bold;
    cursor: pointer;
    margin-left: 1rem;
}

@media(max-width: 768px) {
    .lang-switcher select {
        margin-left: 0;
        margin-top: 1rem;
    }
}