/* Agilion Noir Design System */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette - Approximating Purple/Lilac gradient from swift */
    --primary-gradient: linear-gradient(135deg, #4A0E8F 0%, #9D4EDD 100%);
    --bg-color: #120524;

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --glass-blur: blur(20px);

    /* Spacing & Layout */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    /* Interactive */
    --accent-color: #BE19FD;
    /* Vibrant Agilion Pink/Purple */
    --success-color: #00C853;
    --warning-color: #FFD600;
    --danger-color: #FF3D00;

    /* Animation Easing */
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Stats View */
.stats-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 24px;
}

.stat-box {
    text-align: center;
}

.stat-box h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(to bottom, #fff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Distribution Bars */
.distribution-bar {
    display: flex;
    height: 120px;
    align-items: flex-end;
    gap: 12px;
    padding: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.dist-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 40px;
}

.bar-fill {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px 4px 0 0;
    transition: height 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    min-height: 4px;
}

.bar-fill.highlight {
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.bar-label {
    font-weight: bold;
    font-size: 14px;
}

.bar-count {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 2px;
}

/* Transitions */
.btn,
.input-field,
.glass-card,
.participant-row {
    transition: all 0.3s var(--ease-spring);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(190, 25, 253, 0.3);
}

.input-field:focus {
    transform: scale(1.02);
}

.participant-row:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}


* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Sora', sans-serif;
    color: var(--text-primary);
    background: var(--primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Base Layout for SPA */
#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Glass Card Component */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    margin-bottom: 16px;
}

/* Typography */
h1 {
    font-weight: 700;
    font-size: 34px;
    margin: 0;
    letter-spacing: -0.5px;
}

h2 {
    font-weight: 600;
    font-size: 24px;
    margin: 0 0 16px 0;
}

h3 {
    font-weight: 600;
    font-size: 18px;
    margin: 0 0 8px 0;
}

p {
    font-weight: 400;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: none;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--text-primary);
    color: #4A0E8F;
    /* Primary purple for text */
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-danger {
    background: rgba(255, 61, 0, 0.2);
    border: 1px solid rgba(255, 61, 0, 0.3);
    color: #FF8A80;
}

/* Inputs */
.input-field {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.input-label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    /* Centered Label */
}

.pin-input-container {
    position: relative;
    width: 100%;
    max-width: 340px;
    /* Constrain width for centering */
    margin: 0 auto 20px auto;
    /* Center container */
    height: 60px;
}

.real-pin-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    color: transparent;
    background: transparent;
    border: none;
    outline: none;
    caret-color: transparent;
    z-index: 9999;
    cursor: text;
    pointer-events: auto;
    font-size: 24px;
    letter-spacing: 0;
}

.pin-display {
    display: flex;
    gap: 8px;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass to input */
}

.pin-box {
    width: 48px;
    height: 56px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

/* Focus state handling when real input is focused */
.real-pin-input:focus+.pin-display .pin-box {
    border-color: rgba(255, 255, 255, 0.4);
}

.real-pin-input:focus+.pin-display .pin-box.active {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(190, 25, 253, 0.2);
    transform: translateY(-2px);
}

.pin-box.filled {
    border-color: rgba(74, 14, 143, 0.5);
    background: rgba(74, 14, 143, 0.3);
}

/* --- LANDING PAGE --- */
.landing-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.landing-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.brand-icon {
    width: 60px;
    height: 60px;
    background: white;
    /* Placeholder for spark icon */
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z' /%3E%3C/svg%3E") no-repeat center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z' /%3E%3C/svg%3E") no-repeat center / contain;
    margin-bottom: 20px;
}

.action-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- ROOM PAGE --- */
.room-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

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

.room-code-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

/* User List */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
}

.participant-row {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.participant-info {
    flex: 1;
    font-weight: 600;
}

.status-icon {
    font-size: 20px;
}

.status-ready {
    color: var(--success-color);
}

.status-waiting {
    color: var(--warning-color);
}

.status-host {
    color: var(--warning-color);
}

/* Poker Table / Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 12px;
    padding: 20px 0;
}

.poker-card {
    aspect-ratio: 2/3;
    background: white;
    color: #4A0E8F;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.poker-card:hover {
    transform: translateY(-5px);
}

.poker-card.selected {
    border: 3px solid var(--accent-color);
    transform: translateY(-10px);
}

.poker-card::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px dashed rgba(74, 14, 143, 0.3);
    border-radius: 8px;
}

/* Result Reveal */
.result-display {
    text-align: center;
    padding: 20px;
}

.average-score {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a0d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Vote Badge */
.revealed-vote-badge {
    background: var(--accent-color);
    color: white;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 0 10px rgba(190, 25, 253, 0.4);
    min-width: 40px;
    text-align: center;
}

/* Selections List (Horizontal Chips) */
.selections-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    width: 100%;
}

.selection-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    /* Fully rounded for chip look */
    padding: 6px 16px 6px 6px;
    /* Padding adjustment for badge on left */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
    width: auto;
    /* Width auto for chips */
    flex-grow: 0;
}

.selection-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.selection-card.no-vote {
    background: rgba(255, 61, 0, 0.15);
    border-color: rgba(255, 61, 0, 0.3);
}

.selection-name {
    font-size: 14px;
    color: white;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

/* Chip Badges */
.vote-badge-chip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    color: #4A0E8F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.no-vote-badge-chip {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

/* Poker Table */
/* Poker Table */
/* Poker Table Container (Wrapper) */
.poker-table-container {
    position: relative;
    width: 100%;
    min-height: 500px;
    /* Increased height for outside seating */
    margin: 0 auto 60px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Visual Table Graphic (The actual felt) */
.visual-table-graphic {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    /* Base width */
    height: 180px;
    /* Base height */
    background: radial-gradient(circle, rgba(90, 20, 160, 0.4) 0%, rgba(40, 0, 80, 0.6) 100%);
    border-radius: 100px;
    border: 12px solid rgba(60, 10, 110, 0.5);
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.6),
        0 20px 50px rgba(0, 0, 0, 0.3);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.table-logo {
    color: rgba(255, 255, 255, 0.1);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

.table-seat {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    /* Reduced gap */
    width: auto;
    /* Allow auto width for side layouts */
    min-width: 80px;
    /* Min width for stability */
    transition: all 0.5s var(--ease-spring);
    pointer-events: auto;
    /* Required for hover effects like Kick Button */
}

/* Position Variants */
.table-seat.pos-bottom {
    flex-direction: column;
}

.table-seat.pos-right {
    flex-direction: row;
    justify-content: flex-start;
}

.table-seat.pos-right .participant-name {
    margin-left: 6px;
}

.table-seat.pos-left {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.table-seat.pos-left .participant-name {
    margin-right: 6px;
}

/* Ensure Croupier always bottom name */
.croupier-seat {
    flex-direction: column !important;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.croupier-seat .avatar {
    width: 64px;
    height: 64px;
    border-color: var(--warning-color);
    /* Gold border for Host */
    box-shadow: 0 0 15px rgba(255, 214, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 214, 0, 0.2), rgba(0, 0, 0, 0.2));
}

/* Voted State (User Request: Green/Active Color) */
.avatar.voted {
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(0, 200, 83, 0.4);
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.3), rgba(0, 0, 0, 0.2));
    color: white;
    /* Ensure text remains visible */
}

.croupier-badge {
    position: absolute;
    top: -10px;
    background: var(--warning-color);
    color: black;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.participant-name {
    font-size: 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Status Badges on Avatar */
.seat-status-icon {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.seat-status-ready {
    color: var(--success-color);
}

.seat-status-waiting {
    color: var(--text-secondary);
}

/* Revealed Card Bubble */
.seat-card-reveal {
    position: absolute;
    top: -20px;
    right: -10px;
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

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

/* Kick Button (Host Only) */
.kick-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: var(--error-color);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    /* Prevent clicks when hidden */
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 20;
    /* Higher than avatar status */
    font-size: 12px;
}

/* Hover State: Show Button */
.player-seat:hover .kick-btn {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    top: -8px;
    /* Pop out slightly */
    right: -8px;
}

.kick-btn:hover {
    background: #FF5252;
    transform: scale(1.2) !important;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    /* Soft White */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    padding: 30px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: #1a1a1a;
}

.modal-content h3 {
    color: #1a1a1a;
    font-weight: 700;
}

/* Force override inline styles or defaults for dark theme */
#kick-modal-text {
    color: #666 !important;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    /* Oval */
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

#confirm-kick-btn {
    border-radius: 50px;
    /* Oval */
    padding: 12px 24px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.3);
    transition: transform 0.2s, background 0.2s;
}

#confirm-kick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 82, 82, 0.4);
}

/* Desktop Fixes */
@media (min-width: 768px) {
    .container {
        padding: 40px;
    }

    .landing-container {
        justify-content: center;
    }

    .poker-card {
        font-size: 32px;
    }
}

/* ============================================
   DESKTOP 3-COLUMN LAYOUT (>1024px)
   ============================================ */

/* Room Layout - Mobile First (Stacked) */
.room-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 20px;
    margin-top: 20px;
}

.room-sidebar {
    width: 100%;
}

.room-center {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leave-room-btn {
    margin-top: 20px;
}

/* Mobile: Voting area at bottom, scrollable */
@media (max-width: 1023px) {
    .room-sidebar-left {
        order: 3;
        /* Voting cards at bottom on mobile */
    }

    .room-center {
        order: 1;
    }

    .room-sidebar-right {
        order: 2;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
        gap: 10px;
        padding: 16px 0;
    }

    .poker-card {
        font-size: 20px;
    }

    .sidebar-title {
        display: none;
        /* Hide title on mobile */
    }
}

/* Desktop: 3-Column Layout */
@media (min-width: 1024px) {
    .room-container {
        max-width: 1600px;
        padding: 24px 40px;
        height: 100vh;
        overflow: hidden;
        /* No scrolling on desktop */
    }

    .room-header {
        margin-bottom: 16px;
    }

    .room-layout {
        flex-direction: row;
        flex: 1;
        gap: 24px;
        align-items: stretch;
        min-height: 0;
        /* Important for flex children */
    }

    /* Left Sidebar - Voting Cards */
    .room-sidebar-left {
        width: 200px;
        min-width: 200px;
        display: flex;
        flex-direction: column;
    }

    .room-sidebar-left #voting-area {
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-lg);
        padding: 20px 16px;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .room-sidebar-left .cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
        flex: 1;
        align-content: start;
    }

    .room-sidebar-left .poker-card {
        font-size: 18px;
        aspect-ratio: 1 / 1.2;
    }

    /* Center - Poker Table */
    .room-center {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .room-center .poker-table-container {
        min-height: 400px;
        max-height: 60vh;
        margin-bottom: 0;
    }

    /* Right Sidebar - Results & Controls */
    .room-sidebar-right {
        width: 300px;
        min-width: 300px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .room-sidebar-right .glass-card {
        margin-bottom: 0;
    }

    .room-sidebar-right #result-view {
        flex: 1;
        overflow-y: auto;
        max-height: none;
    }

    .room-sidebar-right .leave-room-btn {
        margin-top: auto;
    }

    /* Result view adjustments for sidebar */
    .room-sidebar-right .stats-container {
        flex-direction: column;
        gap: 16px;
    }

    .room-sidebar-right .stat-value {
        font-size: 32px;
    }

    .room-sidebar-right .distribution-bar {
        height: 80px;
        gap: 8px;
    }

    .room-sidebar-right .selections-list {
        flex-direction: column;
        align-items: stretch;
    }

    .room-sidebar-right .selection-card {
        width: 100%;
    }
}

/* Extra Wide Desktop (>1400px) */
@media (min-width: 1400px) {
    .room-sidebar-left {
        width: 240px;
        min-width: 240px;
    }

    .room-sidebar-left .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .room-sidebar-right {
        width: 360px;
        min-width: 360px;
    }

    .room-center .poker-table-container {
        min-height: 500px;
    }
}