/* ==========================================================================
   BOOKWORMS - Clean, Neat & Cute 2-Player Word Battle Stylesheet
   ========================================================================== */

:root {
    --bg-page: #F5EFEB;
    --bg-card: #FFFFFF;
    --bg-card-subtle: #FAF6F0;
    --bg-tile: #FFFFFF;
    --bg-tile-selected: #EBF8FF;
    
    --text-main: #2D3748;
    --text-muted: #718096;
    --text-light: #A0AEC0;

    --brand-green: #4E8752;
    --brand-green-dark: #386A3C;
    --brand-green-light: #E6F4EA;

    --brand-red: #E0533C;
    --brand-red-light: #FFECE8;
    
    --brand-gold: #E5A11E;
    --brand-gold-light: #FEF7E0;

    --brand-blue: #3182CE;
    --brand-blue-light: #EBF8FF;

    --border-color: #E6DDD4;
    --border-dark: #D4C7BA;

    --shadow-sm: 0 2px 5px rgba(45, 55, 72, 0.06);
    --shadow-md: 0 4px 12px rgba(45, 55, 72, 0.08);
    --shadow-lg: 0 8px 24px rgba(45, 55, 72, 0.12);
    --shadow-tile: 0 3px 0px #D8CFC5, 0 4px 6px rgba(0,0,0,0.04);
    --shadow-tile-active: 0 1px 0px #CBD5E0, 0 2px 4px rgba(0,0,0,0.06);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-heading: 'Fredoka', 'Outfit', sans-serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    touch-action: manipulation;
}

/* Outer Shell (Mobile container on desktop) */
#app-container {
    width: 100%;
    max-width: 460px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--bg-card-subtle);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Utilities */
.hidden {
    display: none !important;
}

.hidden-part {
    display: none !important;
}

/* ==========================================================================
   1. WELCOME SCREEN
   ========================================================================== */

#welcome-screen {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.logo-container {
    text-align: center;
    margin-top: 10px;
}

.logo-icon-wrapper {
    font-size: 3.2rem;
    line-height: 1;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    animation: gentleWiggle 3s ease-in-out infinite;
}

@keyframes gentleWiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-4deg) scale(1.03); }
    75% { transform: rotate(4deg) scale(1.03); }
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-green);
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.logo-tagline {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
}

.welcome-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.welcome-input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--brand-green-dark);
}

.welcome-input-group input {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

.welcome-input-group input:focus {
    border-color: var(--brand-green);
}

/* Mode Selection Cards */
.mode-selection-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mode-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-green);
    box-shadow: var(--shadow-md);
}

.mode-card:active {
    transform: translateY(0);
}

.mode-card-icon {
    font-size: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-green-light);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.mode-card-content {
    flex: 1;
}

.mode-card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.mode-card-content p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.mode-card-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mode-card-select-wrap select {
    background-color: var(--bg-card-subtle);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-green-dark);
    outline: none;
    cursor: pointer;
}

.online-rounds-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    margin-bottom: 4px;
}

.online-rounds-picker label {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

.online-rounds-picker select {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-dark);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-green-dark);
    outline: none;
    cursor: pointer;
}

.welcome-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.btn-clean-pill {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    transition: background-color 0.2s, transform 0.15s;
}

.btn-install {
    background-color: var(--brand-green-light);
    border-color: var(--brand-green);
    color: var(--brand-green-dark);
    font-weight: 700;
}

.btn-install:hover {
    transform: translateY(-2px);
    background-color: #D1EAD7;
}

.btn-clean-pill:hover {
    background-color: var(--brand-green-light);
    color: var(--brand-green-dark);
}

.rules-accordion {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.85rem;
}

.rules-accordion summary {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--brand-green-dark);
    cursor: pointer;
    outline: none;
}

.rules-content {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    color: var(--text-muted);
}

.rules-content ul {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ==========================================================================
   2. GAMEPLAY SCREEN & HUD
   ========================================================================== */

#game-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 12px 14px 12px;
    position: relative;
}

/* Top Bonus Meter */
#bonus-bar-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 6px;
}

.bonus-bar-track {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bonus-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #F3B33D, #E5A11E);
    border-radius: var(--radius-full);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bonus-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--brand-gold);
    letter-spacing: 0.5px;
}

/* Head-to-Head HUD */
.game-header-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    box-shadow: var(--shadow-sm);
    gap: 8px;
}

.player-hud-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s, transform 0.2s;
}

.player-hud-card.active-turn {
    background-color: var(--brand-green-light);
    transform: scale(1.03);
}

.player-avatar-holder {
    width: 48px;
    height: 48px;
    position: relative;
}

.player-info-holder {
    display: flex;
    flex-direction: column;
}

.player-info-holder.right-align {
    align-items: flex-end;
}

.player-name-label {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.player-score-badge {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.score-num {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.score-unit {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
}

.hud-center-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hud-timer-badge {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-green-dark);
    background-color: var(--brand-green-light);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    min-width: 52px;
    text-align: center;
}

.hud-timer-badge.timer-warning {
    color: var(--brand-red);
    background-color: var(--brand-red-light);
    animation: timerPulse 0.8s infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hud-turn-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-main);
}

.hud-round-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-light);
}

/* Worm Avatar SVG & Bubbles */
.worm-avatar-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.worm-visual-box {
    width: 100%;
    height: 100%;
}

.worm-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.worm-bubble-container {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 20;
}

.worm-speech-bubble {
    background-color: #2D3748;
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    animation: popIn 0.2s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Active Powerups Tray */
.active-powerups-tray {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0;
}

.active-powerup-badge {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.active-powerup-badge.clickable {
    cursor: pointer;
    background-color: var(--brand-gold-light);
    border-color: var(--brand-gold);
    color: var(--brand-gold);
}

.active-powerup-badge.synergy {
    background-color: var(--brand-green-light);
    border-color: var(--brand-green);
    color: var(--brand-green-dark);
}

/* ==========================================================================
   3. BOARD & TILES
   ========================================================================== */

.board-main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 6px 0;
    position: relative;
}

.board-wrapper {
    width: 100%;
    aspect-ratio: 7 / 8;
    max-height: calc(100vh - 240px);
    position: relative;
    touch-action: none;
}

.board-inner-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #EFE8DF;
    border: 3px solid #D6CABA;
    border-radius: var(--radius-lg);
    padding: 6px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
}

.board-selection-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.selection-path-glow {
    stroke: rgba(78, 135, 82, 0.35);
    stroke-width: 16px;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.selection-path-core {
    stroke: var(--brand-green);
    stroke-width: 6px;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.board-grid-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 4px;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 5;
}

/* Tile Design */
.board-tile {
    background-color: var(--bg-tile);
    border: 2px solid #E0D7CC;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-tile);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.1s ease;
}

.tile-letter {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    transform: translateY(-1px);
}

.tile-points {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
}

.tile-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    font-size: 0.75rem;
    line-height: 1;
}

/* Tile Selection & States */
.tile-selected {
    background-color: #D1EAD7 !important;
    border-color: var(--brand-green) !important;
    transform: scale(0.94);
    box-shadow: var(--shadow-tile-active) !important;
}

.tile-selected .tile-letter {
    color: var(--brand-green-dark);
}

.tile-golden {
    background-color: #FEFCBF;
    border-color: #ECC94B;
}

.tile-fire {
    background-color: #FED7D7;
    border-color: #F56565;
}

.tile-freeze {
    background-color: #EBF8FF;
    border-color: #63B3ED;
}

.tile-wildcard {
    background-color: #FAF5FF;
    border-color: #B794F4;
}

.tile-ink {
    background-color: #4A5568 !important;
    border-color: #2D3748 !important;
}

.tile-ink .tile-letter {
    font-size: 1.1rem;
}

.tile-frozen-lock {
    background-color: #E2E8F0 !important;
    border-color: #90CDF4 !important;
    opacity: 0.6;
    pointer-events: none;
}

.tile-boulder {
    background-color: #CBD5E0 !important;
    border-color: #718096 !important;
    pointer-events: none;
}

.tile-highlight {
    animation: hintGlow 1s infinite alternate;
}

@keyframes hintGlow {
    0% { background-color: #FEFCBF; border-color: #ECC94B; }
    100% { background-color: #FAF089; border-color: #D69E2E; }
}

.tile-drop-in {
    animation: dropIn 0.25s ease-out;
}

@keyframes dropIn {
    0% { transform: translateY(-30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.tile-clearing {
    animation: tilePopClear 0.25s ease-out forwards;
}

@keyframes tilePopClear {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(0); opacity: 0; }
}

.shake-invalid {
    animation: shakeError 0.35s ease-in-out;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shuffle-banner {
    position: absolute;
    top: 40%;
    left: 5%;
    width: 90%;
    background-color: var(--brand-gold);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 30;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   4. BOTTOM WORD PREVIEW & SUBMISSION
   ========================================================================== */

.game-bottom-bar {
    width: 100%;
}

.word-preview-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.word-preview-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.word-preview-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.word-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
}

.word-text.valid-word {
    color: var(--brand-green);
}

.word-points-chip {
    background-color: var(--brand-green-light);
    color: var(--brand-green-dark);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

/* Toast Banner */
.toast-notice {
    position: absolute;
    bottom: 74px;
    left: 50%;
    transform: translateX(-50%);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    z-index: 50;
    pointer-events: none;
    animation: toastSlide 0.25s ease-out;
}

@keyframes toastSlide {
    0% { transform: translate(-50%, 15px); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

/* ==========================================================================
   5. MODALS & DIALOGS
   ========================================================================== */

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 55, 72, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.modal-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.modal-icon, .modal-trophy {
    font-size: 2.8rem;
    line-height: 1;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-green);
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Powerup Cards Grid */
.powerup-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.powerup-select-card {
    background-color: var(--bg-card-subtle);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
    text-align: left;
}

.powerup-select-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.powerup-select-card.card-buff:hover {
    border-color: var(--brand-green);
}

.powerup-select-card.card-attack:hover {
    border-color: var(--brand-red);
}

.card-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.card-buff .card-badge {
    background-color: var(--brand-green-light);
    color: var(--brand-green-dark);
}

.card-attack .card-badge {
    background-color: var(--brand-red-light);
    color: var(--brand-red);
}

.card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Buttons */
.btn-primary-action {
    background-color: var(--brand-green);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--brand-green-dark);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary-action:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--brand-green-dark);
}

.btn-secondary-action {
    background-color: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--border-dark);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-secondary-action:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--border-dark);
}

.btn-text-close {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 4px;
}

/* Online Modal Details */
.online-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.online-section h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-main);
}

.room-code-box {
    background-color: var(--bg-card-subtle);
    border: 1.5px dashed var(--brand-green);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.room-code-badge {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-green);
    letter-spacing: 2px;
}

.room-code-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.online-divider {
    position: relative;
    text-align: center;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 700;
}

.online-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
    z-index: 1;
}

.online-divider span {
    position: relative;
    z-index: 2;
    background-color: var(--bg-card);
    padding: 0 8px;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button input {
    flex: 1;
    background-color: var(--bg-card-subtle);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    outline: none;
}

/* Game Over Stats */
.gameover-stats-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background-color: var(--bg-card-subtle);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    gap: 10px;
}

.go-player-box {
    flex: 1;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.go-player-box h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.go-player-box strong {
    color: var(--brand-green-dark);
    font-size: 0.95rem;
}

.go-vs-divider {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-light);
}

.gameover-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
