@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* {
    font-family: 'Poppins', sans-serif;
}


:root {
    --wisteria: #c99df2ff;
    --royal-gold: #f5dc4eff;
    --bright-fern: #69a630ff;
    --willow-green: #acd982ff;
    --lavender-purple: #a855f7ff;
    
    /* keep for compatibility */

    --color-primary: #A855F7;
    --color-primary-soft: #C99DF2;
    --color-secondary: #69A630;
    --color-secondary-soft: #ACD982;
    --color-accent: #F5DC4E;
    --color-bg: #faf8ff;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-muted: #6b7280;
    --radius: 16px;
    --shadow: 0 4px 12px rgba(168, 85, 247, 0.08);
    --shadow-hover: 0 6px 16px rgba(168, 85, 247, 0.12);
}


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

body {
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.4s ease;
    position: relative;
}


/* index page */

/* waterfall numbers */

.numbers-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* floating numbers container */
#ballpit-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-number {
    position: absolute;
    font-weight: 700;
    opacity: 0;
    animation: floatWaterfall linear infinite;
    user-select: none;
    pointer-events: none;
    text-shadow: 
        0 0 12px rgba(177, 177, 177, 0.7);
    will-change: transform, opacity;
    
}


/* colors */
.number-purple {
    color: #c084fc;
    filter: brightness(1.4);
}

.number-gold {
    color: #fde047;
    filter: brightness(1.8) saturate(1.8);
   
}

.number-fern {
    color: #84cc16;
    filter: brightness(1.5);
}

.number-willow {
    color: #bef264;
    filter: brightness(1.4);
}

/* waterfall animation */

@keyframes floatWaterfall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.6;
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    15% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.6;
    }
    95% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-120vh) translateX(var(--move-x, 0px)) rotate(var(--rotate-end, 360deg));
        opacity: 0;
    }
}


/* gradient overlay */

body.index-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(168, 85, 247, 0.03) 0%,
        rgba(172, 217, 130, 0.02) 100%
    );
    z-index: -1;
    pointer-events: none;
}


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

/* index header */
body.index-page .site-header {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

.site-header {
    background-color: var(--color-surface);
    box-shadow: var(--shadow);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--lavender-purple);
    text-decoration: none;
    transition: color 0.2s;
}

.logo:hover {
    color: var(--wisteria);
}

.main-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: var(--lavender-purple);
    color: white;
}


.btn-logout {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    color: var(--color-text);
}

.btn-logout:hover {
    color: var(--lavender-purple);
}

/* hero */
.hero {
    padding: 100px 0;
    text-align: center;
    position: relative;
}

body.index-page .hero {
    padding: 120px 0;
}


.hero-content {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 60px 40px;
    margin: 0 auto;
    max-width: 800px;
    box-shadow: 
        0 20px 40px rgba(168, 85, 247, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}


.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--lavender-purple), var(--royal-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--color-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}



/* how it works */
.how-it-works {
    padding: 80px 0;
}

body.index-page .how-it-works {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    margin: 40px auto;
    padding: 60px 40px;
    max-width: 1200px;
    box-shadow: 
        0 20px 40px rgba(168, 85, 247, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}


.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 50px;
}

body.index-page .section-title {
    color: var(--lavender-purple);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background-color: var(--color-surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.index-page .card {
    background: rgba(255, 255, 255, 0.9);
}


.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(168, 85, 247, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--royal-gold), var(--willow-green));
    color: var(--color-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(245, 220, 78, 0.3);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--lavender-purple);
    margin-bottom: 16px;
}

.card-text {
    color: var(--color-muted);
}

.demo-note {
    text-align: center;
    color: var(--color-muted);
    font-style: italic;
    padding: 10px;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    margin-top: 20px;
}

/* footer */
body.index-page .site-footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(168, 85, 247, 0.1);
}


.site-footer {
    margin-top: auto;
    padding: 24px 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--lavender-purple);
}

.footer-text {
    text-align: center;
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* auth */
.auth-section {
    padding: 80px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.auth-card {
    background-color: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 480px;
    margin: 0 auto;
}


.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 30px;
    background-color: var(--color-bg);
    padding: 4px;
    border-radius: var(--radius);
}


.auth-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: none;
    font-weight: 600;
    color: var(--color-muted);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}


.auth-tab.active {
    background-color: var(--color-surface);
    color: var(--lavender-purple);
    box-shadow: var(--shadow);
}


.auth-tab:hover:not(.active) {
    background-color: rgba(168, 85, 247, 0.1);
}


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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--wisteria);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--lavender-purple);
}

.user-type-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.demo-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--color-muted);
}


.demo-divider::before,
.demo-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--wisteria);
}

.demo-divider span {
    padding: 0 15px;
    font-size: 0.9rem;
}


/* dashboard */

.dashboard-hero {
    padding: 60px 0 40px;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--willow-green) 200%);
    text-align: center;
}

.dashboard-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 12px;
}

.dashboard-subtitle {
    font-size: 1.2rem;
    color: var(--color-muted);
    margin-bottom: 24px;
}


#userName {
    color: var(--lavender-purple);
}

#userRole {
    font-weight: 600;
    color: var(--bright-fern);
}

.demo-banner {
    background-color: var(--royal-gold);
    color: var(--color-text);
    padding: 12px 24px;
    border-radius: var(--radius);
    display: inline-block;
    font-weight: 500;
}

.dashboard-features {
    padding: 60px 0 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: var(--color-surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}


.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--bright-fern);
    margin-bottom: 12px;
}

.feature-description {
    color: var(--color-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background-color: var(--lavender-purple);
    color: white;
}

.btn-primary:hover {
    background-color: var(--wisteria);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bright-fern);
    border: 2px solid var(--bright-fern);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bright-fern);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(105, 166, 48, 0.2);
}

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

.btn-accent {
    background-color: var(--royal-gold);
    color: var(--color-text);
}

.btn-accent:hover {
    background-color: #f3d126;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 220, 78, 0.2);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
    min-width: 220px;
}

.btn-full {
    width: 100%;
}

/* focus */

button:focus-visible,
input:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 2px solid var(--royal-gold);
    outline-offset: 2px;
}


/* responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .dashboard-title {
        font-size: 2.2rem;
    }
    
    .main-nav {
        gap: 12px;
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .hero-content {
        padding: 40px 20px;
    }
    
    body.index-page .how-it-works {
        padding: 40px 20px;
        margin: 20px;
    }
    
    /* mobile numbers */

    /* floating numbers container */
#ballpit-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-number {
        font-size: 2rem;
        opacity: 0.1;
    }
}

/* activity page */
.choice-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.choice-card {
    background-color: var(--color-surface);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
}

.choice-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--lavender-purple);
}

.choice-card.selected {
    border-color: var(--lavender-purple);
    background-color: rgba(168, 85, 247, 0.05);
}

.choice-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.choice-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--lavender-purple);
    margin-bottom: 16px;
}

.choice-description {
    color: var(--color-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}


.activity-section {
    background-color: var(--color-surface);
    border-radius: var(--radius);
    padding: 40px;
    margin: 40px 0;
    box-shadow: var(--shadow);
}

.connect-section {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.connect-section h3 {
    font-size: 1.8rem;
    color: var(--lavender-purple);
    margin-bottom: 16px;
}


.connect-description {
    color: var(--color-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.status-text {
    margin-top: 15px;
    font-weight: 500;
    color: var(--color-muted);
}


.status-text.connected {
    color: var(--bright-fern);
}

.digital-content {
    text-align: center;
}

.digital-activities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.activity-card {
    background-color: var(--color-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(168, 85, 247, 0.1);

}

.activity-card h4 {
    color: var(--bright-fern);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.activity-card p {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.back-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(168, 85, 247, 0.1);
}

/* activity responsive */

@media (max-width: 768px) {
    .choice-cards {
        grid-template-columns: 1fr;
    }

    
    .choice-card {
        padding: 30px 20px;
    }
    
    .activity-section {
        padding: 30px 20px;
        margin: 20px 0;
    }

    
    .digital-activities {
        grid-template-columns: 1fr;
    }
}


/* activity improvements */
#questionDisplay {
    margin: 25px 0;
    padding: 20px;
    background: rgba(168, 85, 247, 0.05);
    border-radius: var(--radius);
    border-left: 4px solid var(--lavender-purple);
    transition: all 0.3s ease;
}

#questionDisplay.visible {
    display: block !important;
}

#questionText {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.4;
}

#activityContainer {
    margin-top: 20px;
    transition: all 0.3s ease;
}

/* option buttons */
.option-button {
    transition: all 0.2s ease;
    border: 2px solid var(--wisteria);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 10px 0;
    background: white;
    color: var(--color-text);
    font-size: 1rem;
    text-align: left;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Inter', sans-serif;
}

.option-button:hover:not(:disabled) {
    background: rgba(168, 85, 247, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}

.option-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.option-button.correct {
    background: rgba(105, 166, 48, 0.1);
    border-color: var(--bright-fern);
    color: var(--bright-fern);
}

.option-button.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}


.option-letter {
    width: 36px;
    height: 36px;
    background: var(--color-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--lavender-purple);
    flex-shrink: 0;
}

/* results display */

.activity-result {
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}


.result-correct {
    background: rgba(105, 166, 48, 0.1);
    border-left: 4px solid var(--bright-fern);
}

.result-incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
}

/* status text */
.status-text.connected {
    color: var(--bright-fern);
    font-weight: 600;
}

.status-text.error {
    color: #ef4444;
    font-weight: 600;
}

/* debug */
.debug-highlight {
    border: 3px solid red !important;
    background: yellow !important;
}


/* dashboard grid */
.features-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* glass cards */

.glass-card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(168, 85, 247, 0.2);
    background: rgba(255, 255, 255, 0.95) !important;
}

/* step badges */

.card-step {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    background: rgba(201, 157, 242, 0.2);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid;
    align-self: center;
}


/* badge colors */
.step-purple {
    color: var(--lavender-purple);
    border-color: var(--lavender-purple);
    background: rgba(168, 85, 247, 0.1);
}

.step-green {
    color: var(--bright-fern);
    border-color: var(--bright-fern);
    background: rgba(105, 166, 48, 0.1);
}

.step-gold {
    color: var(--royal-gold);
    border-color: var(--royal-gold);
    background: rgba(245, 220, 78, 0.1);
}

.step-wisteria {
    color: var(--wisteria);
    border-color: var(--wisteria);
    background: rgba(201, 157, 242, 0.1);
}


/* card text */

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
}

.feature-description {
    color: var(--color-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0 10px;
}

/* card buttons */
.glass-card .btn {
    margin-top: auto;
    width: 100%;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

/* button colors */
.feature-card:nth-child(1) .btn-primary {
    background-color: var(--lavender-purple);
}

.feature-card:nth-child(2) .btn-secondary {
    background-color: transparent;
    color: var(--bright-fern);
    border: 2px solid var(--bright-fern);
}

.feature-card:nth-child(2) .btn-secondary:hover {
    background-color: var(--bright-fern);
    color: white;
}

.feature-card:nth-child(3) .btn-accent {
    background-color: var(--royal-gold);
    color: var(--color-text);
}


.feature-card:nth-child(4) .btn-wisteria {
    background-color: var(--wisteria) !important;
    color: white;
}


/* responsive */

@media (max-width: 768px) {
    .features-grid-2x2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .glass-card {
        min-height: 240px;
        padding: 28px 20px;
    }

    
    .feature-title {
        font-size: 1.3rem;
    }
    
    .card-step {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}

/* animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.features-grid-2x2 .feature-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.features-grid-2x2 .feature-card:nth-child(1) { animation-delay: 0.1s; }
.features-grid-2x2 .feature-card:nth-child(2) { animation-delay: 0.2s; }
.features-grid-2x2 .feature-card:nth-child(3) { animation-delay: 0.3s; }
.features-grid-2x2 .feature-card:nth-child(4) { animation-delay: 0.4s; }


/* nav (all pages) */

.icon-btn {
    background: var(--color-surface);
    border: 2px solid var(--wisteria);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}
.icon-btn:hover {
    border-color: var(--lavender-purple);
    transform: scale(1.05);
}

.icon-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--lavender-purple);
    stroke-width: 2;
    fill: none;
}


.slider-menu {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
    border-left: 2px solid var(--wisteria);
    z-index: 1000;
    transition: right 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.slider-menu.open {
    right: 0;
}


.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(168, 85, 247, 0.15);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.menu-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}


.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--wisteria);
}

.menu-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--lavender-purple);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2.4rem;
    cursor: pointer;
    color: var(--color-muted);
    line-height: 1;
    padding: 0 6px;
    transition: 0.2s;
}

.close-btn:hover {
    color: var(--lavender-purple);
    transform: scale(1.2);
}


.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0.8rem;
}

.menu-nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 10px;
    transition: 0.2s;
}

.menu-nav-link:hover {
    background: rgba(168, 85, 247, 0.08);
    color: var(--lavender-purple);
}

.menu-nav-link.active {
    background: rgba(168, 85, 247, 0.1);
    color: var(--lavender-purple);
    font-weight: 600;
}

.menu-divider {
    height: 1px;
    background: rgba(201, 157, 242, 0.5);
    margin: 0.8rem 0 1.2rem;
}


.edit-field {
    margin-bottom: 1.1rem;
}

.edit-field label {
    display: block;
    font-weight: 600;
    color: var(--bright-fern);
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
}

.edit-field input,
.edit-field select {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 50px;
    border: 2px solid var(--wisteria);
    font-size: 0.92rem;
    background: white;
    font-family: 'Poppins', sans-serif;
    transition: 0.2s;
}

.edit-field input:focus,
.edit-field select:focus {
    outline: none;
    border-color: var(--lavender-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}


.save-btn {
    background: var(--bright-fern);
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.2s;
    margin: 0.8rem 0 0.5rem;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

.save-btn:hover {
    background: #4f8a24;
    transform: scale(1.02);
}


.logout-btn {
    background: transparent;
    border: 2px solid #b91c1c;
    color: #b91c1c;
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    border-radius: 60px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    margin-top: auto;
}

.logout-btn:hover {
    background: #b91c1c;
    color: white;
}


/* lang toggle */
.lang-toggle {
    position: fixed; bottom: 20px; left: 20px; z-index: 500;
    display: flex; background: white; border: 2px solid var(--wisteria);
    border-radius: 50px; overflow: hidden; box-shadow: var(--shadow);
}

.lang-btn {
    background: transparent; border: none; padding: 7px 15px; font-size: 0.82rem;
    font-weight: 600; cursor: pointer; font-family: 'Poppins', sans-serif;
    color: var(--color-muted); transition: 0.2s;
}
.lang-btn.active { background: var(--lavender-purple); color: white; border-radius: 50px; }
.lang-btn:hover:not(.active) { color: var(--lavender-purple); }

@media (max-width: 700px) { .slider-menu { width: 88%; right: -88%; } }

/* lang selector */

.lang-selector-inline {
    position: relative;
}
.lang-selector-btn {
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.2s;
}

.lang-selector-btn:hover { 
    color: var(--color-primary); 
}
.lang-dropdown-inline {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1.5px solid var(--wisteria);
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    display: none;
    flex-direction: column;
    min-width: 120px;
    z-index: 200;
}
.lang-dropdown-inline.open { 
    display: flex; 
}
.lang-opt {
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    color: var(--color-text);
    transition: background 0.15s;
}
.lang-opt:hover { 
    background: rgba(168,85,247,0.06); 
    color: var(--color-primary); 
}

.lang-opt.active { 
    color: var(--color-primary); 
    font-weight: 600; 
}
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}



.circles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    justify-items: center;
    align-items: center;
    margin-top: 30px;
}

.circle-card {
    width: 380px;
    height: 380px;
    border-radius: 10%;
    background: var(--color-surface);
    box-shadow: var(--shadow-hover);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 1.8rem;
    border: 4px solid var(--wisteria);
    transition: transform 0.3s ease, box-shadow 0.3s;
    margin: 0 auto;
}


.circle-card:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 40px rgba(168, 85, 247, 0.25);
    border-color: var(--lavender-purple);
}


.step-label {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--bright-fern);
    background: rgba(105, 166, 48, 0.1);
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    border: 1px solid var(--bright-fern);
    margin-bottom: 1rem;
    display: inline-block;
    font-family: 'Poppins', sans-serif;
}

.circle-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bright-fern);
    margin-bottom: 0.9rem;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
}

.circle-desc {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
    max-width: 280px;
    line-height: 1.5;
}


.circle-btn {
    background: transparent;
    border: 2px solid var(--lavender-purple);
    color: var(--lavender-purple);
    padding: 0.6rem 1.8rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
    font-family: 'Poppins', sans-serif;
}

.circle-btn:hover {
    background: var(--lavender-purple);
    color: white;
}

@media (max-width: 1200px) {
    .circle-card {
        width: 320px;
        height: 320px;
    }
}

@media (max-width: 1000px) {
    .circles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .circles-grid {
        grid-template-columns: 1fr;
    }

    .circle-card {
        width: 300px;
        height: 300px;
    }
}


/* global vars */


        :root {
    --wisteria: #c99df2ff;
    --royal-gold: #f5dc4eff;
    --bright-fern: #69a630ff;
    --willow-green: #acd982ff;
    --lavender-purple: #a855f7ff;
    --color-primary: #A855F7;
    --color-primary-soft: #C99DF2;
    --color-secondary: #69A630;
    --color-secondary-soft: #ACD982;
    --color-accent: #F5DC4E;
    --color-bg: #faf8ff;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-muted: #6b7280;
    --radius: 16px;
    --shadow: 0 4px 12px rgba(168, 85, 247, 0.08);
    --shadow-hover: 0 6px 16px rgba(168, 85, 247, 0.12);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}


/* body defined at top */

body.cl-state-active {
    overflow: hidden;
}

/* dashboard header */

/* site-header at top */


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

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--lavender-purple);
    text-decoration: none;
    transition: color 0.2s;
    font-family: 'Poppins', 'Inter', sans-serif;
}

.logo:hover {
    color: var(--wisteria);
}

.main-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.account-icon {
    margin-left: auto;
}

.icon-btn {
    background: var(--color-surface);
    border: 2px solid var(--wisteria);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: var(--shadow);
}

.icon-btn:hover {
    border-color: var(--lavender-purple);
    transform: scale(1.05);
}


.icon-btn svg {
    width: 28px;
    height: 28px;
    stroke: var(--lavender-purple);
    stroke-width: 2;
    fill: none;
}

.header-spacer {
    height: 100px;
    width: 100%;
}

/* slide menu */
.slider-menu {
    position: fixed;
    top: 0;
    right: -35%;
    width: 35%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
    border-left: 2px solid var(--wisteria);
    z-index: 300;
    transition: right 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
    padding: 2.5rem 2.2rem;
    display: flex;
    flex-direction: column;
}

.slider-menu.open {
    right: 0;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(168, 85, 247, 0.2);
    backdrop-filter: blur(3px);
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}


.menu-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--wisteria);
}

.menu-header h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--lavender-purple);
    font-family: 'Poppins', 'Inter', sans-serif;
}


.close-btn {
    background: none;
    border: none;
    font-size: 2.8rem;
    cursor: pointer;
    color: var(--color-muted);
    line-height: 1;
    padding: 0 10px;
    transition: 0.2s;
}

.close-btn:hover {
    color: var(--lavender-purple);
    transform: scale(1.2);
}

.edit-field {
    margin-bottom: 1.8rem;
}

.edit-field label {
    display: block;
    font-weight: 600;
    color: var(--bright-fern);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.edit-field input,
.edit-field select {
    width: 100%;
    padding: 1rem 1.4rem;
    border-radius: 50px;
    border: 2px solid var(--wisteria);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: white;
    transition: 0.2s;
}


.edit-field input:focus,
.edit-field select:focus {
    outline: none;
    border-color: var(--lavender-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.save-btn {
    background: var(--bright-fern);
    border: none;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.2s;
    margin: 1.8rem 0 1rem;
    border: 2px solid transparent;
    width: 100%;
}


.save-btn:hover {
    background: #4f8a24;
    transform: scale(1.02);
    box-shadow: 0 8px 18px rgba(105, 166, 48, 0.3);
}

.logout-btn {
    background: transparent;
    border: 2px solid #b91c1c;
    color: #b91c1c;
    font-size: 1.3rem;
    padding: 0.9rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    width: 100%;
}

.logout-btn:hover {
    background: #b91c1c;
    color: white;
}


/* library */

/* library container */

.library-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    margin-top: 0;
    position: relative;
    padding-top: 0;
}

/* header group */

.cl-header-group {
    text-align: center;
    margin-bottom: 1rem;
    transition: all 0.3s;
    position: relative;
    z-index: 10;
    width: 100%;
}

.cl-header {
    font-size: 3rem;
    padding-bottom: 0.3rem;
    font-weight: 300;
    color: #3f382a;
    opacity: 0.9;
    line-height: 1.1;
}

.cl-math-subtitle {
    font-size: 1rem;
    font-weight: 300;
    color: #5a4f3e;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.cl-stage-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: #6a5e4d;
    letter-spacing: 1px;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
    font-style: italic;
    background: rgba(201, 157, 242, 0.2);
    display: inline-block;
    padding: 0.2rem 1.5rem;
    border-radius: 40px;
    backdrop-filter: blur(2px);
}

/* centre group */

.cl-centre-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
    padding: 0 20px;
    margin-top: 0;
}

.cl-tile-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
    margin: 0.7rem 0 1.2rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.4rem 3rem;
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.15), inset 0 1px 4px rgba(255,255,255,0.9);
    border: 2px solid var(--wisteria);
}


.cl-tile {
    font-size: 1.4rem;
    background: transparent;
    border: none;
    padding: 0.35rem 1.8rem;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.3s ease;
    line-height: 1.3;
    border-radius: 60px;
    letter-spacing: -0.3px;
    width: 100%;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.cl-tile:hover {
    transform: scale(1.02);
    background: rgba(168, 85, 247, 0.1);
    color: var(--lavender-purple);
}

.cl-tile.cl-selected {
    color: #ffffff;
    background-color: #69a630;
   text-shadow: 0 2px 5px rgba(0,0,0,0.1);
    box-shadow: 0 8px 20px rgba(105, 166, 48, 0.3);
    border: none;
}


.cl-generate-btn {
    background: var(--lavender-purple);
    border: none;
    font-size: 1.15rem;
    padding: 0.75rem 2.8rem;
    border-radius: 60px;
    cursor: pointer;
    color: white;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 0.6rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
    font-family: 'Poppins', sans-serif;
}

.cl-generate-btn:hover {
    background: #f5dc4e;
    border-color: #a855f7;
    color: #1f2e1a;
    box-shadow: 0 12px 22px -8px #a855f7;
}


/* active state */
body.cl-state-active .cl-centre-group {
    position: fixed;
    left: 0;
    top: 80px;
    width: 25%;
    height: calc(100vh - 80px);
    margin: 0;
    padding: 1.5rem 0 9rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background: transparent;
    pointer-events: auto;
    overflow-y: auto;
}

/* sidebar header */

body.cl-state-active .cl-header-group {
    padding: 0 1rem 0.5rem 2rem;
    text-align: left;
    margin-bottom: 0.5rem;
    width: 100%;
}


body.cl-state-active .cl-header {
    font-size: 2.4rem;
    text-align: left;
    background: linear-gradient(135deg, var(--lavender-purple), var(--bright-fern));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0;
    margin: 0 0 0.1rem 0;
    line-height: 1.1;
}

body.cl-state-active .cl-math-subtitle {
    font-size: 1rem;
    text-align: left;
    color: var(--color-muted);
    margin: 0 0 0.2rem 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

body.cl-state-active .cl-stage-subtitle {
    font-size: 0.75rem;
    background: rgba(168, 85, 247, 0.1);
    padding: 0.2rem 0.8rem;
    color: var(--lavender-purple);
    backdrop-filter: none;
    margin: 0.2rem 0 0.8rem 0;
    display: inline-block;
    text-align: left;
    border-radius: 20px;
}


/* tile list */

body.cl-state-active .cl-tile-list {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border: none;
    padding: 0 1rem 0.5rem 2rem;
    margin: 0;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    display: flex;
    flex-direction: column;
}

body.cl-state-active .cl-tile {
    font-size: 1.1rem;
    padding: 0.25rem 1rem;
    background: transparent;
    color: #2e3b2c;
    text-align: left;
    width: 100%;
    border-radius: 40px;
}


body.cl-state-active .cl-tile.cl-selected {
    background: #69a630;
    color: white;
}

body.cl-state-active .cl-generate-btn {
    display: none;
}

/* right panel */

.cl-right-panel {
    position: fixed;
    right: 2rem;
    top: 90px;
    width: calc(75% - 3rem);
    height: calc(100vh - 110px);
    background: #fffdfa;
    border-radius: 32px 32px 0 0;
    box-shadow: -8px 8px 30px rgba(0,0,0,0.08);
    opacity: 0;
    transform: translateX(40px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.6s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0d6cc;
    z-index: 100;
}

body.cl-state-active .cl-right-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.cl-panel-header {
    padding: 1.8rem 2rem 0.8rem 2rem;
    border-bottom: 1px solid #dacfc1;
}


.cl-panel-header h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: #2d4623;
}

.cl-panel-header .cl-subhead {
    font-size: 1.3rem;
    color: #6f6b61;
    margin-top: 0.3rem;
    font-style: italic;
}

.cl-filter-area {
    padding: 1.2rem 2rem 0.8rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    border-bottom: 1px dashed #d9cdbb;
}

.cl-filter-toggle {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    background: #efeae2;
    padding: 0.6rem 2rem;
    border-radius: 60px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.05);
}

.cl-filter-toggle span {
    font-weight: 600;
    color: #435238;
    letter-spacing: 0.3px;
    font-size: 1.1rem;
}


.cl-level-pill {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: white;
    padding: 0.25rem 0.9rem 0.25rem 0.7rem;
    border-radius: 40px;
    border: 1px solid #c5b6a4;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    user-select: none;
}

.cl-level-pill.active {
    background: #2e3b2c;
    border-color: #2e3b2c;
    color: white;
    box-shadow: 0 6px 12px rgba(46,59,44,0.25);
}

.cl-level-icon {
    font-size: 0.9rem;
    line-height: 1;
}


.cl-level-pill[data-level="L1"].active {
    background: #69a630;
    border-color: #4f8926;
}
 
.cl-level-pill[data-level="L2"].active {
    background: #c99df2;
    border-color: #a86fd6;
}
 
.cl-level-pill[data-level="L3"].active {
    background: #f5dc4e;
    border-color: #dbb72b;
    color: #2f3d2a;
}
 

.cl-cards-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #fffdfa;
}


        .cl-outcome-label {
            font-size: 0.78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #7c5cbf;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .cl-pmc-badge {
            background: #a855f7;
            color: white;
            font-size: 0.68rem;
            padding: 2px 8px;
            border-radius: 20px;
            font-weight: 600;
            letter-spacing: 0.04em;
        }
        .cl-outcome-ref {
            font-size: 0.8rem;
            color: #999;
            font-style: italic;
        }

        .cl-outcome-list {
    background: #efeae2;
    padding: 1.2rem 2rem;
    border-radius: 20px;
    margin: 0.5rem 0 1rem 0;
    border-left: 6px solid #a855f7;
}

.cl-outcome-list-item {
    font-size: 1rem;
    padding: 0.3rem 0;
    color: #2a3f26;
    list-style-type: disc;
    margin-left: 1.2rem;
}

.cl-strand-header {
    font-size: 1.6rem;
    font-weight: 400;
    color: #276f2b;
    margin: 1rem 0 0.2rem 0;
    border-bottom: 2px solid #acd982;
    padding-bottom: 0.3rem;
}

.cl-card {
    border-left: 5px solid;
    background: white;
    padding: 1.6rem 2rem 1.2rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border-top: 1px solid #f0ebe2;
    border-right: 1px solid #f0ebe2;
    border-bottom: 1px solid #e2d9cb;
    position: relative;
}

.cl-card.l1 { border-left-color: #69a630; }
.cl-card.l2 { border-left-color: #c99df2; }
.cl-card.l3 { border-left-color: #f5dc4e; }

.cl-card.excluded {
    opacity: 0.5;
    background: #f1ede8;
    filter: grayscale(0.3);
}

.cl-question-text {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.cl-options {
    margin: 0.8rem 0 0.8rem 0;
    list-style: none;
}


.cl-options li {
    padding: 0.25rem 0;
    font-size: 1.1rem;
}

.cl-correct {
    background: #efeae2;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    display: inline-block;
    margin: 0.5rem 0 0.5rem 0;
    font-weight: 500;
    color: #1f5820;
    width: fit-content;
}

.cl-explanation {
    margin-top: 0.5rem;
    color: #4f5348;
    font-style: italic;
    padding-left: 0;
    width: 100%;
}

.cl-card-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.cl-btn {
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 1.4rem;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.1s;
    font-family: 'Poppins', sans-serif;
}

.cl-btn-delete {
    background: #fce4e4;
    color: #b00020;
    border: 1px solid #ffb3b3;
}

.cl-btn-delete:hover {
    background: #ffc9c9;
}

.cl-btn-exclude {
    background: #e8e2d8;
    color: #5b4f3e;
    border: 1px solid #c9bcab;
}

.cl-btn-exclude:hover {
    background: #dbd1c2;
}

.cl-btn-include {
    background: #d9e8cf;
    color: #2f6b2f;
    border: 1px solid #9fc78f;
}

.cl-btn-include:hover {
    background: #c5e0b5;
}

/* sidebar footer */
.cl-sidebar-footer {
    display: none;
}

body.cl-state-active .cl-sidebar-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 25%;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background: linear-gradient(to bottom, transparent, var(--color-bg) 35%);
    z-index: 200;
}


/* time widget */

.cl-time-widget {
    background: white;
    padding: 0.7rem 1.1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 2px solid #acd982;
    box-shadow: 0 4px 12px rgba(105, 166, 48, 0.12);
    width: 100%;
}

.cl-time-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    flex: 1;
}

.cl-time-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-muted);
    letter-spacing: 0.2px;
    text-transform: none;
}


#clTimeDisplay {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--bright-fern);
    font-family: 'Poppins', sans-serif;
}

.cl-clock-icon {
    font-size: 1.6rem;
    line-height: 1;
}


body:not(.cl-state-active) .cl-time-widget {
    opacity: 0;
    pointer-events: none;
}


/* start button */

.cl-start-game-btn {
    background: var(--lavender-purple);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.85rem 1.8rem;
    border-radius: 60px;
    border: none;
    box-shadow: 0 8px 22px rgba(168, 85, 247, 0.4);
    cursor: pointer;
    transition: 0.2s;
    display: none;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    text-align: center;
}


.cl-start-game-btn.visible {
    display: block;
}


.cl-start-game-btn:hover {
    background: var(--bright-fern);
    box-shadow: 0 12px 28px rgba(105, 166, 48, 0.4);
    transform: scale(1.02);
}

/* responsive */

@media (max-width: 1200px) {
    .slider-menu { width: 40%; right: -40%; }
}

@media (max-width: 1000px) {
    .slider-menu { width: 50%; right: -50%; }
    body.cl-state-active .cl-centre-group { width: 30%; }
    .cl-right-panel { width: calc(70% - 3rem); }
    body.cl-state-active .cl-sidebar-footer { width: 30%; }
}

@media (max-width: 768px) {
    .cl-header { font-size: 3.5rem; }
    .cl-tile { font-size: 2rem; }
    .cl-tile-list { padding: 1.5rem 2.5rem; }
    .slider-menu { width: 80%; right: -80%; }
    body.cl-state-active .cl-centre-group { width: 100%; position: relative; top: 0; height: auto; }
    .cl-right-panel { width: 100%; right: 0; top: auto; position: relative; margin-top: 20px; }
    body.cl-state-active { overflow-y: auto; }
    body.cl-state-active .cl-sidebar-footer { width: 100%; }
}
/* sidebar flex */

body.cl-state-active .cl-centre-group {
    display: flex !important;
    flex-direction: column !important;
}

/* add question form */

.cl-add-form {
    background: white;
    border-radius: 20px;
    border: 2px solid var(--wisteria);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.08);
    padding: 2rem 2rem 1.6rem 2rem;
    margin-top: 1.5rem;
}

.cl-add-form h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--lavender-purple);
    margin-bottom: 1.4rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(201, 157, 242, 0.3);
    font-family: 'Poppins', sans-serif;
}


.cl-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
}

.cl-form-row label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bright-fern);
    letter-spacing: 0.3px;
    font-family: 'Poppins', sans-serif;
}

/* inputs */
.cl-add-form input[type="text"],
.cl-add-form textarea {
    width: 100%;
    padding: 0.65rem 1.1rem;
    border: 2px solid var(--wisteria);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background: white;
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}


.cl-add-form textarea {
    border-radius: 16px;
    resize: vertical;
    min-height: 80px;
    padding: 0.75rem 1.1rem;
}

.cl-add-form input[type="text"]:focus,
.cl-add-form textarea:focus {
    border-color: var(--lavender-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

/* select wrapper */
.cl-select-wrapper {
    position: relative;
    display: inline-block;
}

.cl-select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lavender-purple);
    pointer-events: none;
    font-size: 1rem;
}

.cl-add-form select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.65rem 2.8rem 0.65rem 1.1rem;
    border: 2px solid var(--wisteria);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background: white;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.cl-add-form select:focus {
    border-color: var(--lavender-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}


/* options group */
.cl-options-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}


.cl-option-input {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.cl-option-input span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--lavender-purple);
    min-width: 1.2rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.cl-option-input input {
    flex: 1;
}

/* correct answer */

.cl-correct-select {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}


.cl-correct-select span {
    font-size: 0.88rem;
    color: var(--color-muted);
    font-style: italic;
}


/* add button */
.cl-add-btn {
    background: linear-gradient(135deg, var(--lavender-purple), var(--wisteria));
    border: none;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.8rem 2.2rem;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 0.6rem;
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.3);
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

.cl-add-btn:hover {
    background: var(--bright-fern);
    box-shadow: 0 10px 22px rgba(105, 166, 48, 0.35);
    transform: scale(1.02);
}


    .cl-info-banner {
        background: rgba(168, 85, 247, 0.06);
        border-left: 4px solid var(--lavender-purple);
        border-radius: 0 12px 12px 0;
        padding: 10px 14px;
        margin: 0 0 14px 0;
        font-size: 0.8rem;
        color: var(--color-muted);
        line-height: 1.5;
    }
    .cl-info-banner strong { color: var(--lavender-purple); }
    .cl-level-hint {
        font-size: 0.75rem;
        color: var(--color-muted);
        margin-top: 6px;
        padding: 0 4px;
    }
/* end library */


/* progress */


/* header */
.header-nav {
    display: flex;
    gap: 8px;
}

.nav-btn {
    background: none;
    border: 1.5px solid rgba(168, 85, 247, 0.2);
    border-radius: 50px;
    padding: 6px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--lavender-purple);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.nav-btn:hover {
    background: rgba(168, 85, 247, 0.06);
    border-color: var(--lavender-purple);
}

.nav-btn.primary {
    background: var(--lavender-purple);
    color: white;
    border-color: var(--lavender-purple);
}

.nav-btn.primary:hover {
    background: #9333ea;
}

/* page title */

.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin-bottom: 36px;
}

/* search bar */

.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--color-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}


.search-input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 1.5px solid rgba(168, 85, 247, 0.2);
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    background: white;
    outline: none;
    transition: 0.2s;
}

.search-input:focus {
    border-color: var(--lavender-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}


.filter-select {
    padding: 10px 16px;
    border: 1.5px solid rgba(168, 85, 247, 0.2);
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    background: white;
    outline: none;
    color: var(--color-text);
    cursor: pointer;
    transition: 0.2s;
}

.filter-select:focus {
    border-color: var(--lavender-purple);
}

.results-count {
    font-size: 0.85rem;
    color: var(--color-muted);
    white-space: nowrap;
}

/* stats strip */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(168, 85, 247, 0.08);
}

.stat-card .stat-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--lavender-purple);
}

.stat-card .stat-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* session list */
.session-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.session-card {
    background: white;
    border-radius: var(--radius);
    padding: 18px 22px;
    box-shadow: var(--shadow);
    border: 1.5px solid rgba(168, 85, 247, 0.08);
    cursor: pointer;
    transition: 0.2s;
    display: grid;
    grid-template-columns: 40px 2fr 120px 160px 100px 1fr 32px;
    align-items: center;
    gap: 16px;
}

.session-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(168, 85, 247, 0.25);
    transform: translateY(-1px);
}


.session-card.expanded {
    border-color: var(--lavender-purple);
    border-radius: var(--radius) var(--radius) 0 0;
    margin-bottom: 0;
}

.team-name-cell {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.team-meta {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 2px;
}


.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--lavender-purple);
}

.accuracy-bar-wrap {
    width: 100%;
}

.accuracy-label {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-bottom: 4px;
}

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

.accuracy-bar-fill {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--bright-fern), var(--willow-green));
    transition: width 0.6s ease;
}


.accuracy-bar-fill.low {
    background: linear-gradient(90deg, #ef4444, #f87171);
}


.accuracy-bar-fill.mid {
    background: linear-gradient(90deg, var(--royal-gold), #fde68a);
}

.cell-label {
    font-size: 0.72rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cell-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 2px;
}

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}


.rank-1 {
    background: #fef3c7;
    color: #d97706;
}
 
.rank-2 {
    background: #f1f5f9;
    color: #475569;
}
 
.rank-3 {
    background: #fef2f2;
    color: #b45309;
}
 
.rank-n {
    background: var(--color-bg);
    color: var(--color-muted);
}
 
.chevron {
    width: 20px;
    height: 20px;
    stroke: var(--color-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform 0.2s;
}

.chevron.open {
    transform: rotate(180deg);
}


/* detail panel */
.detail-panel {
    background: #faf8ff;
    border: 1.5px solid var(--lavender-purple);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 20px 22px;
    margin-top: 0;
    margin-bottom: 10px;
    display: none;
}

.detail-panel.open {
    display: block;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.answer-row {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    border-left: 4px solid transparent;
}

.answer-row.correct {
    border-left-color: var(--bright-fern);
}


.answer-row.incorrect {
    border-left-color: #ef4444;
}

.answer-dish {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    margin-bottom: 4px;
}

.answer-question {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
    line-height: 1.4;
}

.answer-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
}

.answer-correct { color: var(--bright-fern); font-weight: 600; }
.answer-incorrect { color: #ef4444; font-weight: 600; }
.answer-given { color: var(--color-muted); }

/* empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    stroke: var(--wisteria);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}


/* loading */
.loading {
    text-align: center;
    padding: 60px;
    color: var(--color-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(168, 85, 247, 0.2);
    border-top-color: var(--lavender-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}


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


/* column headers */
.list-header {
    display: grid;
    grid-template-columns: 40px 2fr 120px 160px 100px 1fr 32px;
    gap: 16px;
    padding: 0 22px 8px;
}

.list-header span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* responsive */

@media (max-width: 900px) {
    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .session-card {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }
    .session-card .accuracy-bar-wrap,
    .session-card .cell-label,
    .list-header {
        display: none;
    }
}


/* activity page */


/* main layout */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* session info */
.session-info {
    background: var(--color-surface);
    padding: 12px 20px;
    border-radius: var(--radius);
    margin: 20px 20px 0 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.session-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.session-tag {
    background: var(--color-bg);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid var(--wisteria);
}

.session-tag strong {
    color: var(--lavender-purple);
    margin-right: 4px;
}

.digital-mode-toggle {
    background: var(--royal-gold);
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.digital-mode-toggle:hover {
    background: #f3d126;
    transform: translateY(-2px);
}


/* split screen */

#splitSelection {
    flex: 1;
    display: flex;
    min-height: 0;
    width: 100%;
}


.split-panel {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--color-surface);
}

.split-panel.left {
    background: #ffffff;
    border-right: 2px solid var(--wisteria);
}

.split-panel.right {
    background: #ffffff;
}

/* mode cards */

.mode-card {
    max-width: 480px;
    width: 100%;
    text-align: center;
    padding: 2.8rem 2.2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 60px;
    box-shadow: var(--shadow-hover);
    border: 2px solid rgba(168, 85, 247, 0.15);
}

/* fullscreen modes */
.fullscreen-mode {
    display: none;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    background: var(--color-surface);
    padding: 20px;
}

.fullscreen-mode.physical {
    background: #ffffff;
}

.fullscreen-mode.digital {
    background: #ffffff;
}


/* circle button */
.giant-circle-btn {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: var(--bright-fern);
    color: white;
    border: 8px solid var(--willow-green);
    box-shadow: 0 30px 50px rgba(105, 166, 48, 0.4);
    font-size: 2.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
    padding: 2rem;
    font-family: 'Poppins', sans-serif;
    margin: 2rem;
}


.giant-circle-btn:hover {
    background: #4f8f26;
    transform: scale(1.02);
    box-shadow: 0 40px 60px rgba(105, 166, 48, 0.5);
}

/* animation */

.animation-display {
    width: 100%;
    max-width: 420px;
    margin: 16px auto;
    text-align: center;
}


.animation-display img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
}

.dish-name {
    font-size: 1.5rem;
    color: var(--lavender-purple);
    margin-top: 10px;
}

/* digital placeholder */

.digital-placeholder {
    font-size: 2.5rem;
    color: var(--color-muted);
    background: rgba(201, 157, 242, 0.15);
    padding: 4rem;
    border-radius: 80px;
    border: 5px dashed var(--wisteria);
    text-align: center;
    max-width: 800px;
    width: 90%;
    font-family: 'Poppins', sans-serif;
    margin: 20px 0;
}


/* question display */
#questionDisplay {
    margin: 25px 0;
    padding: 20px;
    background: rgba(168, 85, 247, 0.05);
    border-radius: var(--radius);
    border-left: 4px solid var(--lavender-purple);
    width: 100%;
    max-width: 650px;
}


#questionText {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
}


/* back button */
.back-to-split {
    background: transparent;
    border: 2px solid var(--lavender-purple);
    color: var(--lavender-purple);
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    margin-top: 0.5rem;
}


.back-to-split:hover {
    background: var(--lavender-purple);
    color: white;
}



/* modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}


.modal-popup {
    background: var(--color-surface);
    border-radius: 24px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--lavender-purple);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-popup h3 {
    font-size: 1.5rem;
    color: var(--lavender-purple);
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}


.modal-popup p {
    color: var(--color-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    border: none;
}

.modal-btn-primary {
    background: var(--bright-fern);
    color: white;
}

.modal-btn-primary:hover {
    background: #4f8f26;
    transform: translateY(-2px);
}

.modal-btn-secondary {
    background: transparent;
    border: 2px solid var(--lavender-purple);
    color: var(--lavender-purple);
}

.modal-btn-secondary:hover {
    background: var(--lavender-purple);
    color: white;
}

/* quiz hud */
.quiz-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 650px;
    background: white;
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: var(--shadow);
    margin: 12px 0 8px 0;
    gap: 10px;
}

.hud-score {
    display: none !important;
}

.hud-score-icon {
    font-size: 1.2rem;
}

.hud-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.hud-progress-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hud-progress-bar-wrap {
    width: 100%;
    max-width: 180px;
    height: 8px;
    background: var(--color-bg);
    border-radius: 50px;
    overflow: hidden;
}

.hud-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lavender-purple), var(--wisteria));
    border-radius: 50px;
    transition: width 0.4s ease;
}


.hud-timer {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--lavender-purple);
    min-width: 70px;
    justify-content: flex-end;
}

/* dish banner */

.dish-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(168, 85, 247, 0.06);
    border: 1.5px solid rgba(168, 85, 247, 0.2);
    border-radius: 50px;
    padding: 10px 20px;
    width: 100%;
    max-width: 650px;
    margin-bottom: 8px;
}


.dish-banner-emoji {
    font-size: 1.6rem;
}


.dish-banner-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lavender-purple);
}

.dish-banner-sub {
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* question card */
.question-card {
    width: 100%;
    max-width: 650px;
    background: white;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: var(--shadow-hover);
    border: 1.5px solid rgba(168, 85, 247, 0.12);
    margin: 8px 0;
}


.question-card-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.5;
    margin: 0;
}

/* results */
.results-screen {
    width: 100%;
    max-width: 650px;
    background: white;
    border-radius: 24px;
    padding: 36px 32px;
    text-align: center;
    box-shadow: var(--shadow-hover);
    animation: feedbackPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.results-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--lavender-purple);
    margin-bottom: 6px;
}

.results-dish {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin-bottom: 24px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.results-stat {
    background: var(--color-bg);
    border-radius: 16px;
    padding: 16px 12px;
}


.results-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
}


.results-stat-label {
    font-size: 0.78rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}


.results-accuracy-bar-wrap {
    width: 100%;
    height: 12px;
    background: var(--color-bg);
    border-radius: 50px;
    overflow: hidden;
    margin: 8px 0 20px 0;
}


.results-accuracy-bar {
    height: 100%;
    border-radius: 50px;
    transition: width 1s ease;
}

.results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-scan-again {
    background: var(--lavender-purple);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: 0.2s;
}

.btn-scan-again:hover {
    background: var(--wisteria);
    transform: translateY(-2px);
}

/* digital reveal */
.digital-dish-reveal {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(105, 166, 48, 0.06);
    border: 2px solid var(--willow-green);
    border-radius: 20px;
    padding: 16px 24px;
    width: 100%;
    max-width: 650px;
    margin-bottom: 12px;
    animation: feedbackPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.digital-dish-reveal-icon {
    font-size: 2rem;
}

.digital-dish-reveal-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bright-fern);
}

.digital-dish-reveal-sub {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* connect screen */

.connect-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    gap: 20px;
}

.connect-instruction {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    max-width: 500px;
    line-height: 1.4;
}

.connect-sub {
    font-size: 1rem;
    color: var(--color-muted);
    text-align: center;
}

.btn-connect {
    background: var(--bright-fern);
    color: white;
    border: none;
    padding: 18px 48px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: 0.2s;
    box-shadow: 0 6px 20px rgba(105, 166, 48, 0.3);
}

.btn-connect:hover {
    background: #4f8f26;
    transform: translateY(-2px);
}

.btn-connect:disabled {
    background: var(--willow-green);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}



/* team name */
.team-name-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    gap: 24px;
}

.team-name-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
}

.team-name-sub {
    font-size: 1rem;
    color: var(--color-muted);
    text-align: center;
    margin-top: -12px;
}


.team-name-input {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border: 2.5px solid var(--wisteria);
    border-radius: 16px;
    padding: 16px 24px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    color: var(--color-text);
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.team-name-input:focus {
    border-color: var(--lavender-purple);
}

.btn-start-quiz {
    background: var(--lavender-purple);
    color: white;
    border: none;
    padding: 16px 44px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: 0.2s;
}


.btn-start-quiz:hover {
    background: var(--wisteria);
    transform: translateY(-2px);
}

/* team badge */
.team-badge {
    display: none;
    background: white;
    border: 2px solid var(--wisteria);
    border-radius: 50px;
    padding: 6px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lavender-purple);
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}

/* results compact */
.results-compact {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 20px;
    padding: 28px 28px 20px 28px;
    box-shadow: var(--shadow-hover);
    border: 1.5px solid rgba(168, 85, 247, 0.15);
    text-align: center;
    margin-bottom: 16px;
}


.results-compact-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.results-compact-team {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--lavender-purple);
    margin-bottom: 20px;
}

.results-compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.rc-stat {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 14px 8px;
}

.rc-stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.rc-stat-lbl {
    font-size: 0.72rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.btn-review {
    width: 100%;
    background: transparent;
    border: 2px solid var(--lavender-purple);
    color: var(--lavender-purple);
    padding: 13px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: 0.2s;
    margin-top: 4px;
}

.btn-review:hover {
    background: var(--lavender-purple);
    color: white;
}

/* review panel */

.review-panel {
    display: none;
    width: 100%;
    max-width: 650px;
}

.review-panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.review-row {
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 8px;
    text-align: left;
    border-left: 4px solid;
}

.review-row.correct {
    background: rgba(105, 166, 48, 0.08);
    border-color: var(--bright-fern);
}

.review-row.incorrect {
    background: rgba(239, 68, 68, 0.06);
    border-color: #ef4444;
}

.review-row-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}


.review-row-q {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-text);
    margin-bottom: 6px;
}

.review-row-answer {
    font-size: 0.85rem;
    color: var(--color-muted);
}


.review-row-answer strong {
    color: var(--color-text);
}

/* quiz top bar */
.quiz-top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 10px 24px;
    background: white;
    border-bottom: 1.5px solid rgba(168, 85, 247, 0.1);
    flex-shrink: 0;
    box-sizing: border-box;
}

.quiz-top-bar .team-badge {
    display: block !important;
    background: var(--color-bg);
    border: 2px solid var(--wisteria);
    border-radius: 50px;
    padding: 4px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--lavender-purple);
    white-space: nowrap;
    flex-shrink: 0;
}

.quiz-top-bar .hud-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.quiz-top-bar .hud-progress-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.quiz-top-bar .hud-progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: var(--color-bg);
    border-radius: 50px;
    overflow: hidden;
}


.quiz-top-bar .hud-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lavender-purple), var(--wisteria));
    border-radius: 50px;
    transition: width 0.4s ease;
}

.quiz-top-bar .hud-timer {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--lavender-purple);
    min-width: 56px;
    text-align: right;
    flex-shrink: 0;
}

/* quiz split */
#quizSplit {
    display: flex;
    flex-direction: row;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.quiz-left {
    width: 40%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 14px;
    background: rgba(168, 85, 247, 0.03);
    border-right: 2px solid rgba(168, 85, 247, 0.1);
}

.quiz-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 40px;
    overflow-y: auto;
}

.quiz-right #physicalQuestionDisplay {
    max-width: 640px;
    width: 100%;
}

.quiz-right .question-card {
    margin-bottom: 20px;
}

.quiz-right .question-card-text {
    font-size: 1.45rem;
    line-height: 1.6;
    font-weight: 600;
}


.quiz-right .option-button {
    padding: 20px 24px;
    font-size: 1.05rem;
    margin: 9px 0;
    border-radius: 16px;
}

.quiz-left .animation-display {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.quiz-left .animation-display img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 8px 28px rgba(168, 85, 247, 0.12);
}

/* dish label */
.dish-scanned-label {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.dish-scanned-label .dish-banner-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--lavender-purple);
    display: block;
}

.dish-scanned-label .dish-banner-sub {
    font-size: 0.8rem;
    color: var(--color-muted);
    display: block;
}

/* nutrition */
#nutritionCard {
    width: 100%;
    max-width: 340px;
    background: white;
    border-radius: 18px;
    border: 1.5px solid rgba(168, 85, 247, 0.15);
    padding: 14px 16px;
    font-family: 'Poppins', sans-serif;
}

#nutritionTitle {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
}


.nutrition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}


.nutrition-item {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid rgba(168, 85, 247, 0.08);
}


.nutrition-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lavender-purple);
    line-height: 1.2;
}

.nutrition-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* well done */

#wellDoneScreen {
    display: none;
    flex: 1;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

#wellDoneScreen > div {
    background: white;
    border-radius: 28px;
    padding: 48px 40px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.12);
    border: 1.5px solid rgba(168, 85, 247, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* animations */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.97);
    }
}

/* responsive */

@media (max-width: 700px) {
    #splitSelection {
        flex-direction: column;
    }
    .split-panel.left {
        border-right: none;
        border-bottom: 2px solid var(--wisteria);
    }
    .giant-circle-btn {
        width: 260px;
        height: 260px;
        font-size: 1.8rem;
    }
}

@media (max-width: 1000px) {
    .slider-menu {
        width: 70%;
        right: -70%;
    }
}

@media (max-width: 700px) {
    .slider-menu {
        width: 85%;
        right: -85%;
    }

}
