/* --- CUSTOM PALETTE & ANIMATION SYSTEM --- */
:root {
    --bg-color: #f7f3ec;
    --surface-color: #ffffff;
    --surface-border: rgba(60, 46, 36, 0.1);
    --text-main: #2c2420;
    --text-sub: #6b5d52;
    --accent-caramel: #b5734a;
    --accent-light: #3d3128;
    --accent-glow: rgba(181, 115, 74, 0.22);
}

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

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

/* --- CONTINUOUS SCANLINE & LIGHT SWEEP ANIMATION --- */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, transparent 0%, rgba(200, 150, 110, 0.05) 50%, transparent 100%);
    background-size: 100% 8px;
    z-index: 0;
    pointer-events: none;
    animation: scanlineSweep 5s linear infinite;
    contain: paint;
}

.ambient-bg::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at 30% 20%, var(--accent-glow), transparent 55%),
                radial-gradient(circle at 80% 70%, var(--accent-glow), transparent 50%);
    animation: glowPulse 6s ease-in-out infinite alternate;
    will-change: opacity, transform;
}

.ambient-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(200, 150, 110, 0.12) 0%, transparent 70%);
    animation: ambientGlowPulse 6s ease-in-out infinite alternate;
    will-change: opacity, transform;
}

@keyframes scanlineSweep {
    0% { background-position: 0 0; }
    100% { background-position: 0 100vh; }
}

@keyframes ambientGlowPulse {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.06); }
}

@keyframes glowPulse {
    0% { opacity: 0.55; transform: scale(1); }
    100% { opacity: 0.9; transform: scale(1.08); }
}

main {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 2;
}

.content {
    padding: 120px 32px 80px 32px;
    max-width: 1040px;
    margin: 0 auto;
}

header {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    background: transparent;
    border-bottom: 1px solid var(--surface-border);
}

#portalHeader, .portal-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 36px;
    background: transparent;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid var(--surface-border);
}

#portalHeader.hidden, .portal-nav.hidden {
    transform: translateY(-100%);
}

.logo, .brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo-highlight, .brand span {
    color: var(--accent-caramel);
    margin-left: 4px;
}

.brand-tag, .portal-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-sub);
    border: 1px solid var(--surface-border);
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 12px;
    background: rgba(200, 150, 110, 0.08);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

nav a {
    text-decoration: none;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--text-main);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-btn, .signup-btn {
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-btn {
    color: var(--text-main);
    background: transparent;
    border: 1px solid var(--surface-border);
}

.login-btn:hover {
    background-color: rgba(44, 36, 32, 0.05);
    border-color: rgba(44, 36, 32, 0.2);
}

.signup-btn {
    background-color: var(--accent-caramel);
    color: var(--bg-color);
    border: 1px solid var(--accent-caramel);
}

.signup-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-caramel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bg-color);
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
}

.logout-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-sub);
    background: transparent;
    border: 1px solid var(--surface-border);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.logout-btn:hover {
    background-color: rgba(44, 36, 32, 0.05);
    border-color: rgba(44, 36, 32, 0.2);
    color: var(--text-main);
}

.feature-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 60px 0 100px 0;
}

.text-center {
    text-align: center;
    margin-bottom: 45px;
}

.hero-text h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.hero-text p.description {
    font-size: 15.5px;
    color: var(--text-sub);
    max-width: 620px;
    margin: 0 auto 35px auto;
}

.role-selection-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.role-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    padding: 16px 24px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.role-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-caramel);
    box-shadow: 0 12px 30px -10px var(--accent-glow);
}

.role-icon {
    width: 42px;
    height: 42px;
    background-color: rgba(200, 150, 110, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-caramel);
    transition: transform 0.3s ease;
}

.role-card:hover .role-icon {
    transform: scale(1.08) rotate(4deg);
}

.role-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
}

.role-info span {
    font-size: 12px;
    color: var(--text-sub);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1200px;
}

.feature-card {
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 34px 28px;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-caramel);
    box-shadow: 0 20px 40px -12px var(--accent-glow);
}

.card-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(200, 150, 110, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-caramel);
    border: 1px solid rgba(200, 150, 110, 0.3);
    transition: all 0.3s ease;
}

.feature-card:hover .card-icon {
    transform: scale(1.1) translateY(-2px);
    background-color: rgba(200, 150, 110, 0.25);
    color: var(--text-main);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent-light);
    background: rgba(44, 36, 32, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(44, 36, 32, 0.12);
}

.feature-card h3 {
    color: var(--text-main);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-sub);
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.card-meta {
    border-top: 1px solid var(--surface-border);
    padding-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-sub);
}

.meta-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-caramel);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-caramel);
}

.page-head {
    margin-bottom: 32px;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-sub {
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.6;
    max-width: 65ch;
}

.create-btn {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-caramel);
    color: var(--bg-color);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--accent-caramel);
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px var(--accent-glow);
    transition: transform 0.15s;
}

.create-btn:hover {
    transform: translateY(-1px);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 32px 0;
}

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

.stat-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 24px;
}

.stat-label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-sub);
    margin-bottom: 12px;
}

.stat-value {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-main);
}

.stat-foot {
    font-size: 12.5px;
    color: var(--text-sub);
    margin-top: 10px;
}

.stat-foot.live {
    color: var(--accent-caramel);
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-caramel);
    box-shadow: 0 0 0 rgba(200, 150, 110, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(200, 150, 110, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(200, 150, 110, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 150, 110, 0); }
}

.panel {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    overflow: hidden;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--surface-border);
}

.panel-title {
    font-size: 17px;
    font-weight: 700;
}

.panel-note {
    font-size: 12px;
    color: var(--text-sub);
}

.room {
    border-bottom: 1px solid var(--surface-border);
}

.room:last-child {
    border-bottom: none;
}

.room-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.room-row:hover {
    background: rgba(44, 36, 32, 0.03);
}

.room-id {
    display: flex;
    align-items: center;
    gap: 14px;
}

.room-name {
    font-size: 15px;
    font-weight: 600;
}

.room-code {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    background: rgba(200, 150, 110, 0.14);
    color: var(--accent-caramel);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 6px;
}

.room-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-pill {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 20px;
}

.status-pill.live {
    color: var(--bg-color);
    background: var(--accent-caramel);
}

.status-pill.closed {
    color: var(--text-sub);
    background: rgba(44, 36, 32, 0.05);
    border: 1px solid var(--surface-border);
}

.chevron {
    color: var(--text-sub);
    font-size: 14px;
    transition: transform 0.25s ease;
}

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

.room-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 24px;
}

.room.open .room-detail {
    padding-bottom: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 18px;
}

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

.detail-item .k {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.detail-item .v {
    font-size: 13.5px;
}

.detail-item .v.small {
    color: var(--text-sub);
    font-size: 12px;
    margin-top: 3px;
}

.roster-bar {
    height: 6px;
    background: rgba(44, 36, 32, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.roster-fill {
    height: 100%;
    background: var(--accent-caramel);
}

.room-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: var(--accent-caramel);
    color: var(--bg-color);
    border-color: var(--accent-caramel);
    font-weight: 600;
}

.action-btn:hover {
    border-color: var(--accent-caramel);
    background: rgba(200, 150, 110, 0.1);
}

footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 11.5px;
    color: var(--text-sub);
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .container { padding: 0 20px; }

    header, #portalHeader, .portal-nav {
        padding: 16px 20px;
        flex-direction: column;
        gap: 14px;
    }

    nav ul { gap: 20px; }
    .hero-text h1 { font-size: 32px; }
    .role-selection-container { flex-direction: column; align-items: stretch; }
}

.auth-header-nav {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 36px;
    background: transparent;
    border-bottom: none;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 90px);
    padding: 20px;
    position: relative;
    z-index: 2;
}

.auth-card {
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 40px -12px var(--accent-glow);
}

.auth-title {
    text-align: center;
    margin-bottom: 24px;
}

.auth-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.auth-title p {
    font-size: 13px;
    color: var(--text-sub);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-sub);
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    font-family: 'Poppins', sans-serif;
}

.auth-tab.active {
    color: var(--accent-caramel);
    border-bottom-color: var(--accent-caramel);
}

.auth-tab:hover:not(.active) {
    color: var(--text-main);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

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

.theme-input {
    width: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--surface-border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.theme-input:focus {
    border-color: var(--accent-caramel);
}

textarea.theme-input {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 24px;
    font-size: 12.5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-sub);
    cursor: pointer;
}

.forgot-link {
    color: var(--accent-caramel);
    text-decoration: none;
    transition: opacity 0.2s;
}

.forgot-link:hover {
    opacity: 0.8;
}

.full-width {
    width: 100%;
}

@media (max-width: 600px) {
    .auth-header-nav {
        padding: 16px 20px;
    }
    .auth-card {
        padding: 30px 20px;
    }
    .auth-title h2 {
        font-size: 20px;
    }
}

.about-page {
    position: relative;
    overflow-x: hidden;
}

.dynamic-mesh {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(200, 150, 110, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(83, 104, 94, 0.08) 0%, transparent 40%);
    z-index: 0;
    pointer-events: none;
    animation: rotateMesh 30s linear infinite;
    contain: paint;
    will-change: transform;
}

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

.about-container {
    position: relative;
    z-index: 2;
    max-width: 1040px;
    margin: 0 auto;
    padding: 100px 32px 60px;
}

.about-section {
    margin-bottom: 120px;
}

.reveal-up { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-zoom { opacity: 0; transform: scale(0.95); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }

.is-visible { opacity: 1; transform: translate(0) scale(1); }

.glitch-text {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    position: relative;
    color: var(--text-main);
    letter-spacing: -1px;
}

.about-lead {
    font-size: 18px;
    color: var(--text-sub);
    line-height: 1.7;
    max-width: 800px;
}

.card-glass {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px var(--accent-glow);
}

.border-glow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-caramel), transparent);
    opacity: 0.5;
}

.highlight-quote {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-caramel);
    border-left: 3px solid var(--accent-caramel);
    padding-left: 16px;
    margin-top: 24px;
}

.about-sub {
    font-size: 15px;
    color: var(--text-sub);
    max-width: 700px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

.tech-pill {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    color: var(--accent-light);
    padding: 10px 20px;
    border-radius: 30px;
    font-family: monospace;
    font-size: 14px;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.3);
}

.float-1 { animation: floatY 4s ease-in-out infinite; }
.float-2 { animation: floatY 5s ease-in-out infinite 1s; }
.float-3 { animation: floatY 4.5s ease-in-out infinite 0.5s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.team-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-caramel);
    box-shadow: 0 15px 30px -10px var(--accent-glow);
}

.team-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-caramel);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

.team-card h3 {
    color: var(--text-main);
    font-size: 16px;
    margin-bottom: 4px;
}

.team-card span {
    color: var(--text-sub);
    font-size: 12px;
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.cta-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cta-card p {
    color: var(--text-sub);
    font-size: 14px;
    margin: 12px 0 24px;
}

.terminal-btn {
    background: #1e1e1e;
    color: #9cdcfe;
    border: 1px solid #333;
    padding: 14px 20px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.terminal-btn .prompt { color: #4ec9b0; margin-right: 8px; }

.terminal-btn:hover {
    background: #252526;
    border-color: var(--accent-caramel);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

@media (max-width: 900px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-grid { grid-template-columns: 1fr; }
    .glitch-text { font-size: 36px; }
}

.tab-hidden .ambient-bg,
.tab-hidden .ambient-bg::before,
.tab-hidden .ambient-bg::after,
.tab-hidden .dynamic-mesh,
.tab-hidden .live-dot,
.tab-hidden .float-1,
.tab-hidden .float-2,
.tab-hidden .float-3 {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .ambient-bg,
    .ambient-bg::before,
    .ambient-bg::after,
    .dynamic-mesh,
    .live-dot,
    .float-1,
    .float-2,
    .float-3 {
        animation: none;
    }
}

.room-search {
    max-width: 220px;
    padding: 8px 14px;
    font-size: 13px;
}

.modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(30, 22, 20, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    padding: 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.94) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
    transform: scale(1) translateY(0);
}
.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.room-actions .action-btn.copied {
    border-color: var(--accent-caramel);
    color: var(--accent-caramel);
}

@media (max-width: 640px) {
    .room-search { max-width: 100%; width: 100%; }
    .panel-head { flex-direction: column; align-items: stretch; }
}

.question-box {
    background: rgba(44, 36, 32, 0.05);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.question-box-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-sub);
    margin-bottom: 8px;
}

.question-box-text {
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.6;
}

.hero-wrap { position: relative; width: 100%; }
.hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-text { position: relative; z-index: 1; }

.back-link {
    display: inline-block;
    color: var(--text-sub);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 18px;
}

.back-link:hover {
    color: var(--accent-caramel);
}

.submissions-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 860px) {
    .submissions-layout { grid-template-columns: 1fr; }
}

.student-panel { max-height: 560px; overflow-y: auto; }

.student-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--surface-border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.student-row:last-child { border-bottom: none; }
.student-row:hover { background: rgba(44, 36, 32, 0.03); }
.student-row.active { background: rgba(181, 115, 74, 0.1); }
.student-row.disabled { cursor: default; opacity: 0.55; }
.student-row.disabled:hover { background: none; }

.student-name { font-size: 14px; font-weight: 600; }
.student-time { font-size: 11.5px; color: var(--text-sub); margin-top: 3px; }

.student-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.marks-chip {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-caramel);
    background: rgba(181, 115, 74, 0.12);
    padding: 4px 9px;
    border-radius: 20px;
}

.viewer-panel { min-height: 400px; padding: 24px; }

.viewer-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: var(--text-sub);
    font-size: 14px;
    text-align: center;
}

.code-view { margin: 18px 0; }

.code-view textarea {
    width: 100%;
    min-height: 260px;
    background: #1e1e1e;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: #e8e5df;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 16px;
    resize: vertical;
}

.grade-panel {
    border-top: 1px solid var(--surface-border);
    padding-top: 18px;
}

.grade-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.grade-saved-msg {
    font-size: 12.5px;
    color: var(--accent-caramel);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.grade-saved-msg.show { opacity: 1; }
