/* Mathematics Debate - Design System */

:root {
    --primary-hue: 250;
    --primary: hsl(var(--primary-hue), 80%, 60%);
    --primary-light: hsl(var(--primary-hue), 80%, 70%);
    --primary-dark: hsl(var(--primary-hue), 80%, 45%);
    --affirmative: hsl(150, 70%, 45%);
    --affirmative-light: hsl(150, 70%, 55%);
    --affirmative-bg: hsla(150, 70%, 45%, 0.15);
    --challenge: hsl(270, 60%, 55%);
    --challenge-light: hsl(270, 60%, 65%);
    --challenge-bg: hsla(270, 60%, 55%, 0.15);
    --negative: hsl(350, 75%, 55%);
    --negative-light: hsl(350, 75%, 65%);
    --negative-bg: hsla(350, 75%, 55%, 0.15);
    --bg-dark: hsl(230, 25%, 10%);
    --bg-card: hsl(230, 25%, 14%);
    --bg-elevated: hsl(230, 25%, 18%);
    --text-primary: hsl(0, 0%, 95%);
    --text-secondary: hsl(230, 15%, 70%);
    --text-muted: hsl(230, 15%, 50%);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

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

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

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

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, hsla(280, 80%, 50%, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, hsla(200, 80%, 50%, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

#app {
    min-height: 100vh;
}

.screen {
    display: none;
    min-height: 100vh;
    animation: fadeIn var(--transition-base);
}

.screen.active {
    display: block;
}

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

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

.glass-card {
    background: linear-gradient(135deg, hsla(230, 25%, 20%, 0.8), hsla(230, 25%, 15%, 0.6));
    backdrop-filter: blur(20px);
    border: 1px solid hsla(230, 30%, 40%, 0.3);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header.center {
    margin-bottom: 1rem;
}

.page-step {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Simplified Preview */
.sides-preview-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.side-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.side-badge.affirmative {
    background: var(--affirmative-bg);
    border: 2px solid var(--affirmative);
    color: var(--affirmative-light);
}

.side-badge.challenge {
    background: var(--challenge-bg);
    border: 2px solid var(--challenge);
    color: var(--challenge-light);
}

.vs-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-muted);
}

/* Motion Container */
.motion-container {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, hsla(230, 25%, 25%, 0.4), hsla(230, 25%, 20%, 0.4));
    border: 1px solid hsla(230, 30%, 50%, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px hsla(0, 0%, 0%, 0.2);
    position: relative;
    overflow: hidden;
}

.motion-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, hsla(250, 80%, 70%, 0.5), transparent);
}

.page-title-card {
    display: block;
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--primary-light);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px hsla(250, 80%, 60%, 0.5);
}

.motion-text {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    background: linear-gradient(180deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}


/* Difficulty Controls */
.difficulty-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-difficulty {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: hsla(230, 25%, 25%, 0.8);
    border: 1px solid hsla(230, 30%, 40%, 0.5);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-difficulty:hover {
    background: hsla(230, 25%, 30%, 1);
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Battle Arena */
.battle-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

.team-card {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    text-align: center;
    overflow: hidden;
    transition: transform var(--transition-fast);
}

.team-card:hover {
    transform: translateY(-4px);
}

.team-card.affirmative {
    background: linear-gradient(135deg, hsla(150, 70%, 35%, 0.3), hsla(150, 70%, 25%, 0.2));
    border: 2px solid var(--affirmative);
    box-shadow: 0 0 20px hsla(150, 70%, 45%, 0.2);
}

.team-card.challenge {
    background: linear-gradient(135deg, hsla(270, 60%, 40%, 0.3), hsla(270, 60%, 30%, 0.2));
    border: 2px solid var(--challenge);
    box-shadow: 0 0 20px hsla(270, 60%, 55%, 0.2);
}

.team-card-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, hsla(0, 0%, 100%, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.team-card.affirmative .team-card-glow {
    background: radial-gradient(circle, hsla(150, 70%, 60%, 0.15) 0%, transparent 50%);
    animation: teamGlow 3s ease-in-out infinite;
}

.team-card.challenge .team-card-glow {
    background: radial-gradient(circle, hsla(270, 60%, 60%, 0.15) 0%, transparent 50%);
    animation: teamGlow 3s ease-in-out infinite 0.5s;
}

@keyframes teamGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.team-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.team-icon {
    font-size: 1.5rem;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {

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

    50% {
        transform: translateY(-3px) scale(1.1);
    }
}

.team-title {
    text-align: center;
}

.team-role {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.team-title h3 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.team-card.affirmative .team-title h3 {
    color: var(--affirmative-light);
}

.team-card.challenge .team-title h3 {
    color: var(--challenge-light);
}

.team-badge-icon {
    font-size: 1.25rem;
}

.team-stance {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding: 0.4rem 0.75rem;
    background: hsla(0, 0%, 0%, 0.3);
    border-radius: var(--radius-md);
    display: inline-block;
}

.team-groups {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.team-groups .group-chip {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    background: hsla(0, 0%, 100%, 0.1);
    border: 1px solid hsla(0, 0%, 100%, 0.2);
}

.team-card.affirmative .team-groups .group-chip {
    background: var(--affirmative-bg);
    border-color: var(--affirmative);
    color: var(--affirmative-light);
}

.team-card.challenge .team-groups .group-chip {
    background: var(--challenge-bg);
    border-color: var(--challenge);
    color: var(--challenge-light);
}

/* VS Circle */
.vs-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, hsl(45, 100%, 50%), hsl(35, 100%, 45%));
    border-radius: 50%;
    box-shadow: 0 0 25px hsla(45, 100%, 50%, 0.4);
    animation: vsGlow 2s ease-in-out infinite;
}

@keyframes vsGlow {

    0%,
    100% {
        box-shadow: 0 0 15px hsla(45, 100%, 50%, 0.3);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 35px hsla(45, 100%, 50%, 0.6);
        transform: scale(1.05);
    }
}

.vs-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.vs-label {
    font-size: 0.875rem;
    font-weight: 900;
    color: hsl(30, 60%, 20%);
    letter-spacing: 0.1em;
}

/* Gamified Elements */
.motion-banner.gamified {
    position: relative;
    background: linear-gradient(135deg, hsl(250, 50%, 20%), hsl(280, 50%, 18%));
    border: 2px solid var(--primary);
    overflow: hidden;
}

.motion-banner.gamified .motion-label {
    color: hsl(45, 100%, 70%);
    font-size: 0.875rem;
}

.motion-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, hsla(250, 80%, 60%, 0.2) 0%, transparent 50%);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

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

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.team-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-style: italic;
    background: hsla(0, 0%, 0%, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Hint Cards */
.hints-container {
    margin-top: auto;
    padding-top: 1rem;
}

.hint-card {
    padding: 1rem;
    background: linear-gradient(135deg, hsla(45, 100%, 50%, 0.15), hsla(45, 100%, 50%, 0.05));
    border: 1px solid hsla(45, 100%, 50%, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    animation: hintReveal 0.3s ease;
}

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

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

.hint-number {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: hsla(45, 100%, 50%, 0.3);
    border-radius: var(--radius-sm);
    color: hsl(45, 100%, 70%);
    margin-bottom: 0.5rem;
}

.hint-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn-hint {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, hsla(45, 100%, 50%, 0.2), hsla(45, 100%, 50%, 0.1));
    border: 2px dashed hsla(45, 100%, 50%, 0.4);
    color: hsl(45, 100%, 70%);
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-hint:hover {
    background: linear-gradient(135deg, hsla(45, 100%, 50%, 0.3), hsla(45, 100%, 50%, 0.2));
    border-color: hsla(45, 100%, 50%, 0.6);
}

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

/* Glowing Button */
.btn-glow {
    animation: btnGlow 2s ease-in-out infinite;
}

@keyframes btnGlow {

    0%,
    100% {
        box-shadow: var(--shadow-md), 0 0 20px hsla(var(--primary-hue), 80%, 50%, 0.3);
    }

    50% {
        box-shadow: var(--shadow-lg), 0 0 40px hsla(var(--primary-hue), 80%, 50%, 0.5);
    }
}

.header {
    text-align: center;
    padding: 2.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.logo-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

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

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

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--primary), hsl(280, 80%, 65%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.setup-card {
    padding: 2rem;
}

.setup-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

select,
input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-family);
    background: var(--bg-elevated);
    border: 2px solid hsla(230, 30%, 40%, 0.3);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

select:hover,
input[type="text"]:hover {
    border-color: var(--primary);
}

select:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(var(--primary-hue), 80%, 60%, 0.2);
}

.button-group {
    display: flex;
    gap: 0.5rem;
}

.style-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-family);
    background: var(--bg-elevated);
    border: 2px solid hsla(230, 30%, 40%, 0.3);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.style-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
}

.hidden {
    display: none !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px hsla(var(--primary-hue), 80%, 50%, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 40px hsla(var(--primary-hue), 80%, 50%, 0.5);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 2px solid hsla(230, 30%, 40%, 0.3);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: hsla(230, 25%, 30%, 0.3);
    transform: translateX(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--radius-xl);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    font-size: 1.25rem;
}

#generate-btn {
    width: 100%;
    margin-top: 1rem;
}

#back-to-setup {
    margin-bottom: 1rem;
}

.preview-card {
    padding: 2rem;
    text-align: center;
}

.debate-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--primary), hsl(280, 80%, 55%));
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}



.sides-preview {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.side-card {
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    text-align: left;
}

.side-card.affirmative {
    background: var(--affirmative-bg);
    border: 2px solid var(--affirmative);
}

.side-card.negative {
    background: var(--negative-bg);
    border: 2px solid var(--negative);
}

.side-card.challenge {
    background: var(--challenge-bg);
    border: 2px solid var(--challenge);
}

.side-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.side-icon {
    font-size: 1.5rem;
}

.side-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
}

.side-card.affirmative h3 {
    color: var(--affirmative-light);
}

.side-card.negative h3 {
    color: var(--negative-light);
}

.side-card.challenge h3 {
    color: var(--challenge-light);
}

.side-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.vs-badge {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
}

.groups-assignment {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
}

.group-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.group-chip.affirmative {
    background: var(--affirmative-bg);
    color: var(--affirmative-light);
    border: 1px solid var(--affirmative);
}

.group-chip.negative {
    background: var(--negative-bg);
    color: var(--negative-light);
    border: 1px solid var(--negative);
}

.group-chip.challenge {
    background: var(--challenge-bg);
    color: var(--challenge-light);
    border: 1px solid var(--challenge);
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Debate Screen */
.debate-container {
    min-height: 100vh;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.debate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.phase-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.debate-header-actions {
    display: flex;
    gap: 0.5rem;
}

.phase-icon {
    font-size: 1.25rem;
}

.timer-display {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glow);
}

.timer-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.timer-display.warning {
    background: linear-gradient(135deg, hsl(40, 90%, 50%), hsl(30, 90%, 45%));
    animation: timerPulse 1s ease-in-out infinite;
}

.timer-display.danger {
    background: linear-gradient(135deg, var(--negative), hsl(350, 75%, 45%));
    animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {

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

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

.motion-banner {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
    border-radius: var(--radius-2xl);
    margin-bottom: 1.5rem;
    border: 1px solid hsla(230, 30%, 40%, 0.3);
}

.motion-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.debate-motion {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

.debate-sides {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    flex: 1;
    margin-bottom: 1.5rem;
}

.debate-side {
    padding: 1.5rem;
    border-radius: var(--radius-2xl);
    display: flex;
    flex-direction: column;
}

.debate-side.affirmative {
    background: var(--affirmative-bg);
    border: 2px solid var(--affirmative);
}

.debate-side.negative {
    background: var(--negative-bg);
    border: 2px solid var(--negative);
}

.debate-side.challenge {
    background: var(--challenge-bg);
    border: 2px solid var(--challenge);
}

.side-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.side-emoji {
    font-size: 2rem;
}

.side-title h3 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.debate-side.affirmative .side-title h3 {
    color: var(--affirmative-light);
}

.debate-side.negative .side-title h3 {
    color: var(--negative-light);
}

.debate-side.challenge .side-title h3 {
    color: var(--challenge-light);
}

.groups-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.group-tag {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: hsla(0, 0%, 100%, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: default;
}

.group-tag:hover {
    background: hsla(0, 0%, 100%, 0.2);
    transform: scale(1.05);
}

.argument-prompts {
    margin-bottom: 1.25rem;
}

.argument-prompts h4,
.key-vocab h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.argument-prompts ul {
    list-style: none;
    padding-left: 0;
}

.argument-prompts li {
    position: relative;
    padding: 0.75rem;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
    background: hsla(0, 0%, 0%, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.argument-prompts li::before {
    content: '💡';
    position: absolute;
    left: 0.75rem;
}

.vocab-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vocab-tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: hsla(0, 0%, 100%, 0.15);
    border-radius: var(--radius-full);
}

.debate-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid hsla(230, 30%, 40%, 0.3);
}

/* Argument Hints (hidden by default) */
.argument-hints {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.argument-hints h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.argument-hints ul {
    list-style: none;
    padding-left: 0;
}

.argument-hints li {
    position: relative;
    padding: 0.75rem;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
    background: hsla(0, 0%, 0%, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.argument-hints li::before {
    content: '💡';
    position: absolute;
    left: 0.75rem;
}

.reveal-hints-btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Voting Screen */
.voting-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.voting-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.voting-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.voting-motion {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    margin-bottom: 2.5rem;
    max-width: 700px;
}

.voting-options {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 3rem;
    font-family: var(--font-family);
    border: 3px solid;
    border-radius: var(--radius-2xl);
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 200px;
    color: white;
}

.vote-btn.affirmative {
    background: var(--affirmative-bg);
    border-color: var(--affirmative);
}

.vote-btn.affirmative:hover {
    background: hsla(150, 70%, 45%, 0.2);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px hsla(150, 70%, 45%, 0.3);
    border-color: var(--affirmative-light);
}

.vote-btn.negative {
    background: var(--negative-bg);
    border-color: var(--negative);
}

.vote-btn.negative:hover {
    background: hsla(0, 80%, 50%, 0.2);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px hsla(0, 80%, 50%, 0.3);
    border-color: var(--negative-light);
}

.vote-btn.challenge {
    background: var(--challenge-bg);
    border-color: var(--challenge);
}

.vote-btn.challenge:hover {
    background: hsla(270, 60%, 55%, 0.2);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px hsla(270, 60%, 55%, 0.3);
    border-color: var(--challenge-light);
}

.vote-emoji {
    font-size: 4rem;
}

.vote-label {
    font-size: 1.25rem;
    font-weight: 700;
}

.vote-count {
    font-size: 2.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.voting-controls {
    margin-top: 1rem;
}

/* Results Screen */
.results-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.confetti span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(-100px) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

.results-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.results-title {
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.winner-announcement {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    animation: winnerReveal 0.8s ease;
}

@keyframes winnerReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.winner-emoji {
    font-size: 6rem;
}

.winner-announcement h3 {
    font-size: 2.5rem;
    font-weight: 800;
}

.winner-announcement.affirmative h3 {
    color: var(--affirmative-light);
}

.winner-announcement.negative h3 {
    color: var(--negative-light);
}

.winner-announcement.challenge h3 {
    color: var(--challenge-light);
}

.winner-announcement.tie h3 {
    color: var(--primary-light);
}

.vote-breakdown {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
}

.vote-bar-container {
    display: flex;
    height: 60px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.vote-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    transition: width 1s ease;
}

.vote-bar.affirmative {
    background: linear-gradient(90deg, var(--affirmative), var(--affirmative-light));
}

.vote-bar.negative {
    background: linear-gradient(90deg, var(--negative-light), var(--negative));
}

.vote-bar.challenge {
    background: linear-gradient(90deg, var(--challenge), var(--challenge-light));
}

.vote-bar:hover {
    filter: brightness(1.2);
    transform: scaleY(1.05);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.bar-label {
    font-weight: 600;
    font-size: 0.875rem;
}

.bar-value {
    font-weight: 800;
    font-size: 1.125rem;
}

.vote-totals {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.reflection-prompt {
    padding: 1.25rem;
    margin-bottom: 2rem;
    max-width: 500px;
    text-align: left;
}

.reflection-prompt h4 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.reflection-prompt p {
    color: var(--text-secondary);
    font-style: italic;
}

.results-actions {
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .sides-preview {
        grid-template-columns: 1fr;
    }

    .vs-badge {
        order: -1;
    }

    .debate-sides {
        grid-template-columns: 1fr;
    }

    .motion-text,
    .debate-motion {
        font-size: 1.25rem;
    }

    .voting-options {
        flex-direction: column;
        width: 100%;
    }

    .vote-btn {
        width: 100%;
    }

    .timer-value {
        font-size: 2rem;
    }

    /* Battle Arena responsive */
    .battle-arena {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .vs-circle {
        width: 50px;
        height: 50px;
        order: 0;
        margin: 0 auto;
    }

    .vs-icon {
        font-size: 1rem;
    }

    .vs-label {
        font-size: 0.75rem;
    }

    .team-card.affirmative {
        order: -1;
    }

    .team-card.challenge {
        order: 1;
    }

    .difficulty-controls {
        flex-wrap: wrap;
    }

    .btn-difficulty {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Preparation Screen - Compact Layout */
.preparation-container {
    background: linear-gradient(135deg, hsla(230, 25%, 20%, 0.8), hsla(230, 25%, 15%, 0.6));
    backdrop-filter: blur(20px);
    border: 1px solid hsla(230, 30%, 40%, 0.3);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "timer timer"
        "aff neg";
    gap: 1.5rem;
    align-items: start;
}

#prep-timer-container {
    grid-area: timer;
    margin-bottom: 0;
    padding: 0.75rem;
    flex-direction: row;
}

#prep-timer-container .timer-display {
    font-size: 2.5rem;
    padding: 0;
    background: transparent;
    box-shadow: none;
    text-shadow: 0 0 15px hsla(250, 80%, 60%, 0.5);
}

.primary-instruction {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, hsl(45, 100%, 70%), hsl(35, 100%, 50%), hsl(45, 100%, 70%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px hsla(var(--primary-hue), 80%, 60%, 0.3);
}

.preparation-container .team-card {
    position: relative;
    margin-bottom: 0;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    min-height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    text-align: center;
}

/* Default hover effect removed in favor of specifics */

.preparation-container .team-card.affirmative {
    grid-area: aff;
    background: linear-gradient(135deg, hsla(150, 70%, 35%, 0.3), hsla(150, 70%, 25%, 0.2));
    border: 2px solid var(--affirmative);
    box-shadow: 0 0 20px hsla(150, 70%, 45%, 0.2);
}

.preparation-container .team-card.affirmative:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 30px hsla(150, 70%, 45%, 0.3);
}

.preparation-container .team-card.challenge {
    grid-area: neg;
    background: linear-gradient(135deg, hsla(270, 60%, 40%, 0.3), hsla(270, 60%, 30%, 0.2));
    border: 2px solid var(--challenge);
    box-shadow: 0 0 20px hsla(270, 60%, 55%, 0.2);
}

.preparation-container .team-card.challenge:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 30px hsla(270, 60%, 55%, 0.3);
}

.prep-groups {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.prep-actions {
    text-align: center;
    margin-top: 0;
}

.timer-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Timer Styles */
.timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: hsla(230, 25%, 10%, 0.3);
    border-radius: var(--radius-xl);
    border: 1px solid hsla(230, 30%, 40%, 0.2);
}

.timer-display {
    font-size: 3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    text-shadow: 0 0 20px hsla(250, 80%, 60%, 0.3);
    transition: color var(--transition-base);
}

.timer-display.urgent {
    color: var(--negative);
    animation: urgentPulse 1s ease-in-out infinite;
}

@keyframes urgentPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@media (max-width: 768px) {
    .preparation-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "timer"
            "instruction"
            "aff"
            "neg";
    }
}

/* Debate Turn Manager */
.debate-turn-manager {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(180deg, hsla(230, 25%, 20%, 0.9), hsla(230, 25%, 15%, 0.8));
    border: 1px solid hsla(230, 30%, 50%, 0.2);
    transition: all var(--transition-base);
}

.debate-turn-manager:hover {
    background: linear-gradient(180deg, hsla(230, 25%, 22%, 0.95), hsla(230, 25%, 17%, 0.85));
    border-color: hsla(230, 30%, 60%, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.timer-display-large {
    font-size: 3.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
    background: linear-gradient(180deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.turn-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-turn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    transition: all var(--transition-base);
    color: white;
    opacity: 0.7;
    filter: grayscale(0.5);
}

.btn-turn:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: translateY(-4px) scale(1.02);
}

.btn-turn.affirmative:hover {
    box-shadow: 0 0 20px hsla(150, 70%, 45%, 0.4);
}

.btn-turn.challenge:hover {
    box-shadow: 0 0 20px hsla(270, 60%, 55%, 0.4);
}

.btn-turn.affirmative {
    background: linear-gradient(135deg, hsla(150, 70%, 35%, 0.9), hsla(150, 70%, 25%, 0.9));
    border-color: var(--affirmative);
}

.btn-turn.challenge {
    background: linear-gradient(135deg, hsla(270, 60%, 40%, 0.9), hsla(270, 60%, 30%, 0.9));
    border-color: var(--challenge);
}

.btn-turn.active {
    opacity: 1;
    filter: grayscale(0);
    box-shadow: 0 0 20px currentColor;
    transform: scale(1.05);
}

.btn-turn.affirmative.active {
    color: var(--affirmative-light);
    box-shadow: 0 0 25px hsla(150, 70%, 45%, 0.4);
}

.btn-turn.challenge.active {
    color: var(--challenge-light);
    box-shadow: 0 0 25px hsla(270, 60%, 55%, 0.4);
}

.btn-icon-only {
    padding: 0.75rem;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-base);
}

.btn-icon-only:hover {
    background: var(--bg-card);
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Active/Inactive Panel States */
.debate-sides {
    transition: all var(--transition-base);
}

.debate-side {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1);
    filter: grayscale(0);
}

.debate-side:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 5;
}

.debate-side.affirmative:hover {
    box-shadow: 0 20px 50px hsla(150, 70%, 45%, 0.25);
    border-color: var(--affirmative-light);
    background: linear-gradient(135deg, hsla(150, 70%, 15%, 0.9), hsla(150, 70%, 10%, 0.8));
}

.debate-side.challenge:hover {
    box-shadow: 0 20px 50px hsla(270, 60%, 55%, 0.25);
    border-color: var(--challenge-light);
    background: linear-gradient(135deg, hsla(270, 60%, 20%, 0.9), hsla(270, 60%, 15%, 0.8));
}

.debate-header-actions .btn:hover {
    background: hsla(230, 25%, 40%, 0.3);
    color: white;
    transform: scale(1.05);
}

/* When a specific side is active */
.debate-sides[data-active-side="affirmative"] .debate-side.challenge {
    opacity: 0.3;
    transform: scale(0.95);
    filter: grayscale(0.8) blur(1px);
    pointer-events: none;
}

.debate-sides[data-active-side="affirmative"] .debate-side.affirmative {
    opacity: 1;
    transform: scale(1.03);
    box-shadow: 0 0 40px hsla(150, 70%, 45%, 0.2);
    z-index: 10;
}

.debate-sides[data-active-side="challenge"] .debate-side.affirmative {
    opacity: 0.3;
    transform: scale(0.95);
    filter: grayscale(0.8) blur(1px);
    pointer-events: none;
}

.debate-sides[data-active-side="challenge"] .debate-side.challenge {
    opacity: 1;
    transform: scale(1.03);
    box-shadow: 0 0 40px hsla(270, 60%, 55%, 0.2);
    z-index: 10;
}

.timer-display-large.urgent {
    background: linear-gradient(180deg, #ef4444, #b91c1c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 1s infinite;
}

/* =========================================
   Cinematic Loading Overlay
   ========================================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, hsla(230, 25%, 15%, 0.9), hsla(230, 25%, 5%, 0.95));
    backdrop-filter: blur(20px);
    z-index: 9999;

    /* Flex layout */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Transition properties */
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Override global .hidden to allow transitions */
.loading-overlay.hidden {
    display: flex !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    transform: scale(1);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loading-overlay.hidden .loading-content {
    transform: scale(0.9);
}

/* Spinner Animation */
.loading-spinner-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2.5rem;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--affirmative);
    border-bottom-color: var(--challenge);
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    box-shadow: 0 0 50px hsla(250, 80%, 60%, 0.3);
    filter: drop-shadow(0 0 10px var(--primary));
}

.spinner-ring::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--primary-light);
    border-left-color: var(--challenge-light);
    opacity: 0.5;
    animation: spinReverse 2s linear infinite;
}

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

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

.spinner-core {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    animation: pulseCore 1.5s ease-in-out infinite alternate;
    text-shadow: 0 0 30px var(--primary);
}

@keyframes pulseCore {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
        text-shadow: 0 0 50px white;
    }
}

/* Text Animations */
.loading-text {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px hsla(250, 80%, 60%, 0.5);
    letter-spacing: -0.02em;
}

.loading-status {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-style: italic;
    background: hsla(230, 25%, 25%, 0.5);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    border: 1px solid hsla(230, 25%, 40%, 0.3);
}

/* Floating Particles */
.math-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-weight: 900;
    opacity: 0;
    color: var(--text-muted);
    filter: blur(1px);
}

/* Specific particle animations */
.p1 {
    top: 20%;
    left: 20%;
    font-size: 2rem;
    color: var(--primary);
    animation: float1 4s infinite ease-in-out 0s;
}

.p2 {
    top: 70%;
    left: 80%;
    font-size: 3rem;
    color: var(--affirmative);
    animation: float2 5s infinite ease-in-out 0.5s;
}

.p3 {
    top: 40%;
    left: 60%;
    font-size: 1.5rem;
    color: var(--challenge);
    animation: float3 4.5s infinite ease-in-out 1s;
}

.p4 {
    top: 80%;
    left: 30%;
    font-size: 2.5rem;
    color: var(--primary-light);
    animation: float1 5.5s infinite ease-in-out 1.5s;
}

.p5 {
    top: 15%;
    left: 70%;
    font-size: 2rem;
    color: var(--text-primary);
    animation: float2 4.2s infinite ease-in-out 0.2s;
}

.p6 {
    top: 60%;
    left: 10%;
    font-size: 2.5rem;
    color: var(--affirmative-light);
    animation: float3 4.8s infinite ease-in-out 0.7s;
}

.p7 {
    top: 30%;
    left: 90%;
    font-size: 1.8rem;
    color: var(--challenge-light);
    animation: float1 5.2s infinite ease-in-out 1.2s;
}

.p8 {
    top: 90%;
    left: 50%;
    font-size: 2.2rem;
    color: var(--primary);
    animation: float2 4.6s infinite ease-in-out 0.9s;
}

@keyframes float1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    25% {
        opacity: 0.8;
    }

    50% {
        transform: translate(30px, -50px) rotate(10deg);
        opacity: 0.4;
    }

    75% {
        opacity: 0.8;
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    25% {
        opacity: 0.8;
    }

    50% {
        transform: translate(-30px, 40px) rotate(-15deg);
        opacity: 0.4;
    }

    75% {
        opacity: 0.8;
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    25% {
        opacity: 0.8;
    }

    50% {
        transform: translate(20px, 40px) rotate(20deg);
        opacity: 0.4;
    }

    75% {
        opacity: 0.8;
    }
}

/* =========================================
   Prep Phase Cinematic Overlay
   ========================================= */

.prep-overlay {
    background: radial-gradient(circle at center, hsla(260, 40%, 10%, 0.95), hsla(260, 40%, 5%, 0.98));
}

.prep-visuals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.prep-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: hsla(230, 25%, 20%, 0.5);
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.prep-icon-wrapper.affirmative {
    animation: slideInLeft 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    border-color: var(--affirmative);
    box-shadow: 0 0 30px hsla(150, 70%, 45%, 0.4);
}

.prep-icon-wrapper.challenge {
    animation: slideInRight 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    border-color: var(--challenge);
    box-shadow: 0 0 30px hsla(270, 60%, 55%, 0.4);
}

.icon-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    animation: spin 4s linear infinite;
}

.vs-flash {
    font-size: 3rem;
    font-weight: 900;
    font-style: italic;
    color: #ffd700;
    text-shadow: 0 0 20px #ffd700;
    animation: vsFlash 1s ease-in-out infinite alternate;
    z-index: 10;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) scale(0.5);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.5);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes vsFlash {
    from {
        transform: scale(1);
        opacity: 0.8;
    }

    to {
        transform: scale(1.2);
        opacity: 1;
        text-shadow: 0 0 40px #ffd700, 0 0 80px #ff0000;
    }
}

.prep-loading-text {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    animation: pulseText 1s ease-in-out infinite alternate;
}

@keyframes pulseText {
    from {
        transform: scale(1);
        letter-spacing: 0.05em;
    }

    to {
        transform: scale(1.05);
        letter-spacing: 0.1em;
    }
}

.prep-loading-status {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    animation: fadeInUp 0.5s ease-out 0.5s backwards;
}

/* Speed Lines Background */
.prep-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -1;
}

.speed-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    width: 200%;
    transform: rotate(-15deg);
    animation: speedLine 0.5s linear infinite;
}

.sl1 {
    top: 10%;
    animation-duration: 0.3s;
    width: 150%;
}

.sl2 {
    top: 30%;
    animation-duration: 0.5s;
    opacity: 0.5;
}

.sl3 {
    top: 50%;
    animation-duration: 0.4s;
    width: 180%;
}

.sl4 {
    top: 70%;
    animation-duration: 0.6s;
    opacity: 0.3;
}

.sl5 {
    top: 90%;
    animation-duration: 0.35s;
    width: 160%;
}

@keyframes speedLine {
    from {
        transform: translateX(-50%) rotate(-15deg);
    }

    to {
        transform: translateX(50%) rotate(-15deg);
    }
}

/* =========================================
   Debate Start Cinematic Overlay
   ========================================= */

.debate-overlay {
    background: radial-gradient(circle at center, hsla(0, 0%, 8%, 0.98), hsla(0, 0%, 2%, 1));
}

/* Checkered Flag */
.flag-container {
    position: relative;
    margin-bottom: 2rem;
    animation: flagEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes flagEntrance {
    from {
        opacity: 0;
        transform: translateY(-100px) rotate(-20deg) scale(0.5);
    }

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

.flag-pole {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 180px;
    background: linear-gradient(180deg, #444, #222);
    border-radius: 2px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
}

.checkered-flag {
    display: flex;
    flex-direction: column;
    margin-left: 4px;
    transform-origin: left center;
    animation: flagWave 1.5s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

@keyframes flagWave {

    0%,
    100% {
        transform: rotateY(0deg) translateX(0);
    }

    25% {
        transform: rotateY(-8deg) translateX(5px);
    }

    50% {
        transform: rotateY(0deg) translateX(0);
    }

    75% {
        transform: rotateY(8deg) translateX(-5px);
    }
}

.flag-row {
    display: flex;
}

.flag-square {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.flag-square.black {
    background: #000;
}

.flag-square.white {
    background: #fff;
}

/* Add subtle wave to individual squares */
.flag-row:nth-child(1) .flag-square {
    animation: squareWave 1.5s ease-in-out infinite 0s;
}

.flag-row:nth-child(2) .flag-square {
    animation: squareWave 1.5s ease-in-out infinite 0.1s;
}

.flag-row:nth-child(3) .flag-square {
    animation: squareWave 1.5s ease-in-out infinite 0.2s;
}

.flag-row:nth-child(4) .flag-square {
    animation: squareWave 1.5s ease-in-out infinite 0.3s;
}

@keyframes squareWave {

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

    50% {
        transform: scaleY(0.95);
    }
}

/* Countdown Display */
.countdown-display {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.countdown-number {
    font-size: 15rem;
    font-weight: 900;
    color: #fff;
    text-shadow:
        0 0 30px rgba(255, 255, 255, 0.8),
        0 0 60px rgba(255, 215, 0, 0.6),
        0 10px 40px rgba(0, 0, 0, 0.8);
    animation: countdownPulse 1s ease-in-out;
    opacity: 0;
}

@keyframes countdownPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

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

/* Text Styling */
.debate-loading-text {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffd700, #ff4500, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    animation: shimmerText 2s ease-in-out infinite, bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}

@keyframes shimmerText {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }

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

.debate-loading-status {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    animation: fadeInUp 0.5s ease-out 1s backwards;
}

/* Racing Stripes Background */
.race-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -1;
}

.racing-stripe {
    position: absolute;
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 215, 0, 0.1) 25%,
            rgba(255, 69, 0, 0.15) 50%,
            rgba(255, 215, 0, 0.1) 75%,
            transparent 100%);
    transform: skewY(-3deg);
    animation: racingStripe 1.5s linear infinite;
}

.rs1 {
    top: 20%;
    animation-duration: 1.2s;
}

.rs2 {
    top: 50%;
    animation-duration: 1.5s;
    animation-delay: 0.3s;
}

.rs3 {
    top: 80%;
    animation-duration: 1.8s;
    animation-delay: 0.6s;
}

@keyframes racingStripe {
    from {
        transform: translateX(-100%) skewY(-3deg);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    to {
        transform: translateX(100%) skewY(-3deg);
        opacity: 0;
    }
}