:root {
    --bg-color: #f0f2f5;
    --wood-dark: #5d4037;
    --wood-light: #8d6e63;
    --wood-panel: #d7ccc8;
    --wood-panel-border: #a1887f;
    --marble-red: #d32f2f;
    --marble-black: #212121;
    --forbidden-color: rgba(0, 0, 0, 0.3);
    --font-main: 'Outfit', sans-serif;
    --grid-gap: 0.8vmin;
    /* Consistent gap unit */
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.game-container {
    position: relative;
    /* For absolute positioning of user-display */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* Reduced gap */
    padding: 10px;
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    padding-left: calc(10px + env(safe-area-inset-left));
    padding-right: calc(10px + env(safe-area-inset-right));
    /* Reduced padding */
    max-width: 100vw;
    min-height: 100vh;
    /* Full height */
    height: auto;
    justify-content: center;
    /* Center vertically */
}

.game-header {
    text-align: center;
    width: 100%;
}

h1 {
    font-size: 3rem;
    color: var(--wood-dark);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.turn-indicator {
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.turn-indicator.red-turn {
    color: var(--marble-red);
    border: 2px solid var(--marble-red);
}

.turn-indicator.black-turn {
    color: var(--marble-black);
    border: 2px solid var(--marble-black);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--wood-dark);
    color: white;
    font-family: var(--font-main);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--wood-light);
}

.board-area {
    background-color: #bcaaa4;
    padding: 20px;
    /* Reduced padding */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center items */
    gap: 30px;
    /* Reduced gap */
    flex: 1;
    /* Take available space */
    width: 100%;
    max-height: 90vh;
    /* Limit height */
}

.board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: var(--grid-gap);
    background-color: rgba(0, 0, 0, 0.1);
    padding: var(--grid-gap);
    border-radius: 4px;
    align-self: center;
    width: min(60vw, 75vh);
    height: min(60vw, 75vh);
    max-width: none;
    max-height: none;
    aspect-ratio: 1 / 1;
}

/* ... (panel styles) ... */

/* Score Panels */
.score-panel {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    /* width: 250px; Removed fixed width */
    flex: 1;
    /* Adaptive width */
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent overflow */
}

/* ... */

.score-details {
    text-align: left;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
    /* Fill available space */
    overflow-y: auto;
    /* Scroll if needed */
    min-height: 0;
    /* Required for flex scrolling */
}

.total-score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--wood-dark);
    margin-top: auto;
    /* Push to bottom */
}

.panel {
    background-color: var(--wood-panel);
    border: none;
    border-radius: 4px;
    display: grid;
    gap: var(--grid-gap);
    /* Match board gap for square cells */
    place-items: center;
    box-shadow: inset 0 0 0 2px var(--wood-panel-border), inset 0 0 10px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: opacity 0.3s;
}

/* Wood texture effect */
.panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.02) 10px, rgba(0, 0, 0, 0.02) 20px);
    pointer-events: none;
}

.panel.forbidden {
    opacity: 0.6;
    filter: grayscale(0.5);
    cursor: not-allowed;
    box-shadow: inset 0 0 0 2px var(--wood-panel-border), inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.hole {
    width: 90%;
    height: 90%;
    aspect-ratio: 1;
    background-color: #a1887f;
    /* Darker wood for hole */
    border-radius: 50%;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    align-items: center;
    transition: transform 0.1s;
    border: 4px solid transparent;
    /* Reserve space for highlight border */
}

.hole:hover {
    transform: scale(1.05);
}

/* Highlight Styles */
/* Highlight Styles */
.hole.highlight-red,
.hole.highlight-black {
    border: 4px solid #2196F3;
    position: relative;
    z-index: 5;
    transform: translateZ(0);
    /* Hardware acceleration */
}

.hole.highlight-red {
    background-color: rgba(211, 47, 47, 0.6);
}

.hole.highlight-black {
    background-color: rgba(33, 33, 33, 0.6);
}

/* Optimized Pulse using Pseudo-element */
.hole.highlight-red::after,
.hole.highlight-black::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    /* Cover border */
    border-radius: 50%;
    box-shadow: 0 0 15px #2196F3, 0 0 25px #2196F3;
    opacity: 0;
    animation: pulseOpacity 1.5s infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes pulseOpacity {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}





.marble {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.2);
    animation: dropIn 0.3s ease-out;
}

.marble.red {
    background: radial-gradient(circle at 30% 30%, #ff5252, #b71c1c);
}

.marble.black {
    background: radial-gradient(circle at 30% 30%, #616161, #000000);
}

@keyframes dropIn {
    from {
        transform: scale(1.5);
        opacity: 0;
    }

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

.game-footer {
    color: #777;
    font-size: 0.9rem;
}

/* Menu Styles */
.menu-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 500px;
    width: 90%;
    margin: 20px auto;
}

.menu-btn {
    display: block;
    width: 100%;
    margin: 15px 0;
    padding: 15px;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.menu-btn:hover {
    transform: translateY(-2px);
}

.marble.last-move {
    border: 4px solid #ffffff;
    transform: scale(1.15);
    z-index: 20;
    position: relative;
    /* No box-shadow animation on main element */
}

.marble.last-move::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    box-shadow: 0 0 15px #ffffff, 0 0 25px #ffffff;
    opacity: 0;
    animation: pulseOpacity 1.5s infinite;
    z-index: -1;
}

/* Reusing pulseOpacity from highlight styles */

/* Score Panels */
.score-panel {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    /* width: 250px; Removed fixed width */
    flex: 1;
    /* Adaptive width */
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent overflow */
}

.score-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.red-panel h3 {
    color: var(--marble-red);
    border-color: var(--marble-red);
}

.black-panel h3 {
    color: var(--marble-black);
    border-color: var(--marble-black);
}

.marble-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--wood-dark);
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 8px;
}

.marble-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.2);
}

.marble-icon.red {
    background: radial-gradient(circle at 30% 30%, #ff5252, #b71c1c);
}

.marble-icon.black {
    background: radial-gradient(circle at 30% 30%, #616161, #000000);
}

.score-details {
    text-align: left;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
    /* Fill available space */
    overflow-y: auto;
    /* Scroll if needed */
    min-height: 0;
    /* Required for flex scrolling */
}

.total-score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--wood-dark);
    margin-top: auto;
    /* Push to bottom */
}

.score-panel.winner {
    border: 5px solid #13ff00;
    /* Gold */
    box-shadow: 0 0 20px #4affa7;
}

.score-panel.loser {
    opacity: 0.7;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
    opacity: 0;
    transform: translateX(100%);
    animation: slideIn 0.3s forwards, fadeOut 0.3s forwards 3s;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
}

.toast.info {
    border-left: 5px solid #2196F3;
}

.toast.success {
    border-left: 5px solid #4CAF50;
}

.toast.warning {
    border-left: 5px solid #FF9800;
}

.toast.error {
    border-left: 5px solid #F44336;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.score-item {
    margin-bottom: 8px;
    font-size: 1rem;
    border-bottom: 1px dashed #eee;
    padding-bottom: 4px;
}

.score-item:last-child {
    border-bottom: none;
}

/* Interactive Score Highlights */
/* Interactive Score Highlights */
.highlight-line,
.highlight-area {
    box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.8) !important;
    border: 3px solid #FFD700 !important;
    transform: scale(1.02);
    z-index: 100 !important;
    opacity: 1 !important;
}

/* Remove old marble highlights */
.highlight-line .marble,
.highlight-area .marble {
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.2);
    /* Reset to default */
    z-index: auto;
}

.highlight-panel-won {
    box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.8) !important;
    border: 3px solid #FFD700 !important;
    transform: scale(1.02);
    z-index: 100 !important;
    /* Ensure it's on top */
    opacity: 1 !important;
    /* Override any disabled opacity */
}

.score-item {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.score-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.panel-detail-list {
    display: block;
    /* Always visible */
    margin-top: 5px;
    padding-left: 10px;
    font-size: 0.85rem;
    color: #555;
    text-align: left;
    max-height: 150px;
    /* Optional: scroll if too many */
    overflow-y: auto;
}

/* .score-item:hover .panel-detail-list { display: block; }  <-- Removed */

.panel-detail-item {
    margin-bottom: 2px;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
}

.panel-detail-item:hover {
    background-color: rgba(255, 215, 0, 0.2);
    font-weight: bold;
}

/* Mobile Responsiveness */

/* Tablet / Narrow Desktop */
@media (max-width: 850px) {
    .board-area {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding: 10px;
        max-height: none;
    }

    .score-panel {
        width: 45%;
        max-width: none;
        min-width: 140px;
        order: 2;
        min-height: auto;
        /* Let content define height */
        margin: 0;
        padding: 10px;
    }

    .board {
        order: 1;
        /* Board first */
        width: 100%;
        height: auto;
        max-width: none;
        max-height: none;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .board-area {
        padding: 10px;
        gap: 20px;
    }

    .board {
        gap: 2px;
        padding: 5px;
    }

    .hole {
        width: 34px;
        height: 34px;
    }

    .marble {
        width: 26px;
        height: 26px;
    }

    .panel {
        border-width: 1px;
    }

    .score-panel {
        padding: 15px;
    }

    .score-panel h3 {
        font-size: 1.2rem;
    }

    .total-score {
        font-size: 1.5rem;
    }
}

/* Header Redesign */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-controls {
    display: flex;
    gap: 10px;
}

.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--wood-dark);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    z-index: 100;
}

.icon-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-icon {
    display: none;
    /* Hide icons by default on desktop */
}

.btn.secondary {
    background-color: #795548;
}

.btn.danger {
    background-color: #d32f2f;
}

/* Mobile Header Adjustments */
@media (max-width: 600px) {
    .status-bar {
        flex-direction: column;
        gap: 15px;
    }

    .status-info {
        width: 100%;
        justify-content: space-between;
    }

    .status-controls {
        width: 100%;
        justify-content: space-between;
    }

    .icon-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 5px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .user-info {
        position: static;
        /* Reset absolute positioning */
        margin: 10px auto;
        width: fit-content;
        max-width: 100%;
    }

    .status-bar {
        flex-direction: column;
    }

    .game-header h1 {
        margin-top: 10px;
    }
}

/* Shake Animation for Forbidden Moves */
@keyframes shakeError {

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

    25%,
    75% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }
}

.panel.shake-error {
    animation: shakeError 0.4s ease-in-out;
    box-shadow: inset 0 0 0 2px red, inset 0 0 10px rgba(0, 0, 0, 0.05) !important;
    z-index: 10;
    /* Bring to front */
}

/* Shake/Flash Animation for Invalid Holes */
@keyframes flashError {
    0% {
        background-color: #a1887f;
        box-shadow: none;
    }

    50% {
        background-color: rgba(244, 67, 54, 0.5);
        box-shadow: 0 0 10px red;
    }

    100% {
        background-color: #a1887f;
        box-shadow: none;
    }
}



/* Refined Flash Animation (Border Only) */
@keyframes flashErrorBorder {
    0% {
        box-shadow: none;
    }

    50% {
        box-shadow: inset 0 0 0 4px rgba(255, 82, 82, 0.7);
    }

    /* Thicker, paler red (Red A200ish) */
    100% {
        box-shadow: none;
    }
}

.hole.flash-error {
    animation: flashErrorBorder 0.4s ease-in-out;
}

/* Modern Login Redesign */
.auth-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #5d4037 0%, #3e2723 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-card {
    background-color: var(--wood-panel);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    border: 8px solid var(--wood-dark);
    animation: cardEntrance 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px dashed var(--wood-panel-border);
    border-radius: 12px;
    pointer-events: none;
}

.auth-title {
    font-size: 2.5rem;
    color: var(--wood-dark);
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.auth-subtitle {
    color: #5d4037;
    opacity: 0.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.game-input-group {
    margin-bottom: 1.5rem;
    position: relative;
    text-align: left;
}

.game-input-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--wood-dark);
    font-weight: bold;
    font-size: 0.9rem;
    padding-left: 5px;
}

.game-input {
    width: 100%;
    padding: 15px;
    background-color: #a1887f;
    /* Darker wood hole color */
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.game-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.game-input:focus {
    outline: none;
    background-color: #8d6e63;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.wood-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #5d4037, #4e342e);
    color: #f5f5f5;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow:
        5px 5px 10px rgba(0, 0, 0, 0.2),
        -5px -5px 10px rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-family: var(--font-main);
    letter-spacing: 1px;
}

.wood-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        7px 7px 15px rgba(0, 0, 0, 0.3),
        -5px -5px 10px rgba(255, 255, 255, 0.05);
}

.wood-btn:active {
    transform: translateY(1px);
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.wood-btn.secondary {
    background: linear-gradient(145deg, #8d6e63, #795548);
    margin-top: 1rem;
}

.auth-divider {
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    color: var(--wood-dark);
    opacity: 0.6;
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--wood-dark);
    opacity: 0.3;
}

.auth-divider span {
    padding: 0 10px;
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-link {
    color: var(--wood-dark);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.auth-link:hover {
    border-color: var(--wood-dark);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* High z-index to sit on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    animation: cardEntrance 0.4s ease-out;
}

.close {
    color: var(--wood-dark);
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.close:hover,
.close:focus {
    color: #d32f2f;
    text-decoration: none;
    cursor: pointer;
}

/* Friend Menu Styles */
#friend-menu {
    text-align: center;
}

#friend-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.code-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#room-code-display {
    font-family: monospace;
    letter-spacing: 3px;
    font-size: 1.8rem;
    padding: 10px 20px;
    background: #eee;
    border: 2px dashed var(--wood-dark);
    border-radius: 8px;
    color: var(--wood-dark);
    min-width: 150px;
}

#copy-code-btn {
    padding: 10px;
    border-radius: 8px;
    background: var(--wood-light);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

#copy-code-btn:hover {
    background: var(--wood-dark);
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--wood-dark);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#room-code-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    text-align: center;
    border: 2px solid var(--wood-panel-border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

#room-code-input:focus {
    border-color: var(--wood-dark);
}

/* Main Menu User Info */
.menu-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed #ddd;
    width: 100%;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    background-color: var(--wood-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 4px solid white;
}

.menu-username {
    font-size: 1.5rem;
    color: var(--wood-dark);
    font-weight: bold;
    margin: 0;
}

/* Mobile adjustments for menu header */
@media (max-width: 480px) {
    .menu-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .user-avatar-large {
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
    }

    .menu-username {
        font-size: 1.3rem;
    }
}

/* Active Player Glow */
.score-panel.active-turn {
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.8), 0 0 40px rgba(33, 150, 243, 0.4);
    border: 2px solid #2196F3;
    z-index: 10;
}