/*
 * Host Page Styles - Moonlight Mayhem
 * Extracted from host.html inline styles
 * Uses CSS variables from theme.css
 */

/* ============================================
   LAYOUT & BASE OVERRIDES
   ============================================ */

body {
    overflow: hidden;
}

/* ============================================
   CONNECTION STATUS INDICATOR
   ============================================ */

.connection-status {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
    z-index: 1001;
}

.connection-status.connecting {
    background: var(--color-warning);
    box-shadow: var(--glow-moon);
}

.connection-status.disconnected {
    background: var(--color-danger-bright);
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

/* ============================================
   LOBBY VIEW
   ============================================ */

.lobby-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    padding: 20px 40px;
    overflow-y: auto;
    box-sizing: border-box;
}

.host-game-title {
    font-size: 3.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: var(--glow-moon-bright);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ============================================
   QR CODE & JOIN URL (Collapsible)
   ============================================ */

.qr-section {
    width: fit-content;
    min-width: 300px;
    margin-bottom: 20px;
}

.qr-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.3), rgba(37, 117, 252, 0.3));
    border: 1px solid rgba(106, 17, 203, 0.5);
    border-radius: var(--radius-lg);
    color: var(--color-accent-primary);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qr-toggle:hover {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.4), rgba(37, 117, 252, 0.4));
    border-color: var(--color-accent-primary);
}

.qr-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-accent-primary);
}

.qr-toggle.gamepad-focus {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.5), rgba(37, 117, 252, 0.5));
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px rgba(244, 208, 63, 0.6), var(--glow-moon);
    transform: scale(1.02);
}

.qr-toggle-text {
    text-shadow: var(--glow-moon);
}

.qr-toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.qr-section.collapsed .qr-toggle-icon {
    transform: rotate(-90deg);
}

.qr-section.collapsed .qr-toggle {
    border-radius: var(--radius-lg);
}

.qr-section:not(.collapsed) .qr-toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(106, 17, 203, 0.5);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    max-height: 400px;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.qr-section.collapsed .qr-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    border: none;
}

.qr-code-container {
    background: white;
    padding: 12px;
    border-radius: var(--radius-lg);
    margin-bottom: 15px;
    box-shadow: var(--shadow-xl);
}

.qr-code-container img {
    display: block;
    max-width: 200px;
    height: auto;
}

.join-url {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2);
    text-align: center;
}

.join-url-label {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.join-url-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    text-shadow: var(--glow-moon);
    white-space: nowrap;
    padding: 0 var(--spacing-4);
}

/* ============================================
   PLAYERS SECTION (LOBBY)
   ============================================ */

.players-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.players-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    text-align: center;
    margin-bottom: 15px;
    text-shadow: var(--glow-moon);
    border-bottom: 2px solid rgba(244, 208, 63, 0.3);
    padding-bottom: 10px;
}

.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
    justify-content: center;
}

/* Force TV player card styles in lobby with explicit values */
.player-list .tv-player-card {
    background: rgba(26, 10, 46, 0.7) !important;
    border: 3px solid rgba(245, 245, 220, 0.25) !important;
    border-radius: 1.5rem !important;
    padding: 12px 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    cursor: pointer;
    width: 320px !important;
    height: 120px !important;
}

.player-list .tv-player-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    font-size: 1.8rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(26, 10, 46, 0.5) !important;
    flex-shrink: 0 !important;
}

.player-list .tv-player-status {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #28a745 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.6) !important;
}

.player-list .tv-player-status.disconnected {
    background: #dc3545 !important;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.6) !important;
}

.player-list .tv-player-card.host-player {
    border-color: #f4d03f !important;
    box-shadow: 0 8px 30px rgba(244, 208, 63, 0.3) !important;
}

.player-count-status {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent-primary);
    text-align: center;
    margin-top: 10px;
    margin-bottom: 8px;
    transition: color var(--transition-base);
}

.player-count-status.status-error {
    color: var(--color-danger-bright);
}

/* ============================================
   HOST CONTROLS & BUTTONS
   ============================================ */

.host-controls {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.btn-start-game {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    padding: 12px 40px;
    border-radius: var(--radius-lg);
    font-weight: bold;
    box-shadow: 0 8px 30px rgba(244, 208, 63, 0.4);
    transition: all var(--transition-base);
}

.btn-start-game:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-moon-bright);
}

.btn-configure {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    padding: 12px 40px;
    border-radius: var(--radius-lg);
    font-weight: bold;
    box-shadow: 0 8px 30px rgba(108, 117, 125, 0.4);
    transition: all var(--transition-base);
}

.btn-configure:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(108, 117, 125, 0.6);
}

/* ============================================
   VOTING DISPLAY
   ============================================ */

.voting-display {
    max-width: 1400px;
    margin: 0 auto;
}

.voting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-glass-bg-light);
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin-bottom: 10px;
}

.hidden {
    display: none;
}

/* ============================================
   GAME VIEW (FULLSCREEN TV LAYOUT)
   ============================================ */

.game-view {
    display: none;
    height: 100vh;
    padding: 40px;
    overflow-y: auto;
    box-sizing: border-box;
}

.tv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px 20px 0 20px;
}

.tv-phase-display {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    text-shadow: var(--glow-moon-bright);
    text-align: center;
    flex: 1;
}

/* ============================================
   TV PLAYERS SECTION
   ============================================ */

.tv-players-section {
    margin-top: 60px;
}

.tv-players-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid rgba(244, 208, 63, 0.3);
    padding-bottom: 20px;
}

.tv-players-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
    justify-content: center;
}

.tv-player-card {
    background: var(--color-glass-bg);
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
    border: var(--border-width-thick) solid var(--color-glass-border-bright);
    border-radius: var(--radius-xl);
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    width: fit-content;
    max-width: 400px;
}

.tv-player-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-primary);
    box-shadow: 0 12px 40px rgba(244, 208, 63, 0.3);
}

.tv-player-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-glass-bg-light);
    flex-shrink: 0;
}

.tv-player-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.tv-player-nickname {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-win-badge {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    padding: 4px 12px;
    border-radius: var(--radius-md);
    background: var(--color-glass-bg-light);
    display: inline-block;
    width: fit-content;
}

.tv-win-badge.rank-1 {
    background: rgba(244, 208, 63, 0.25);
    color: var(--color-accent-primary-bright);
    font-weight: bold;
}

.tv-win-badge.rank-2 {
    background: rgba(192, 192, 192, 0.25);
    color: #c0c0c0;
    font-weight: bold;
}

.tv-win-badge.rank-3 {
    background: rgba(205, 127, 50, 0.25);
    color: #cd7f32;
    font-weight: bold;
}

.tv-player-status {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--color-success);
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.6);
}

.tv-player-status.disconnected {
    background: var(--color-danger-bright);
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.6);
}

/* ============================================
   TV ROLES SECTION
   ============================================ */

.tv-roles-section {
    margin-top: 15px;
    margin-bottom: 15px;
}

.tv-roles-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid rgba(244, 208, 63, 0.3);
    padding-bottom: 8px;
}

.tv-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.tv-role-card {
    background: var(--color-glass-bg);
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    border-radius: var(--radius-lg);
    padding: 12px;
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.tv-role-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent-primary);
    box-shadow: 0 6px 20px rgba(244, 208, 63, 0.3);
}

.tv-role-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.tv-role-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: 5px;
}

.tv-role-count {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-accent-primary);
}

/* ============================================
   LOBBY ROLES SECTION
   ============================================ */

.lobby-roles-section {
    width: 100%;
    max-width: 1200px;
    margin: 15px auto 0 auto;
}

.lobby-roles-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(244, 208, 63, 0.3);
    padding-bottom: 8px;
}

.lobby-roles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px;
}

.lobby-role-card {
    background: var(--color-glass-bg-light);
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
    border: var(--border-width-base) solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-base);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lobby-role-card:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 208, 63, 0.4);
    box-shadow: 0 6px 16px rgba(244, 208, 63, 0.2);
}

.lobby-role-icon {
    font-size: 1.8rem;
}

.lobby-role-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

.lobby-role-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    background: rgba(244, 208, 63, 0.2);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    margin-left: 4px;
}

.lobby-divider {
    width: 100%;
    max-width: 800px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(244, 208, 63, 0.4), transparent);
    margin: 20px auto;
}

/* ============================================
   CONFIGURATION VIEW
   ============================================ */

.config-view {
    display: none;
    height: 100vh;
    padding: 60px 80px;
    overflow-y: auto;
    box-sizing: border-box;
}

.config-title {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-accent-primary);
    text-shadow: var(--glow-moon-bright);
}

.config-content {
    max-width: 1600px;
    margin: 0 auto;
}

.config-section {
    margin-bottom: 50px;
}

.config-section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    margin-bottom: 30px;
    border-bottom: 3px solid rgba(244, 208, 63, 0.3);
    padding-bottom: 15px;
}

/* ============================================
   ROLES GRID (CONFIGURATION)
   ============================================ */

.roles-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 40px;
}

.role-card {
    background: var(--color-glass-bg);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    border-radius: var(--radius-lg);
    padding: 20px 25px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.role-card:hover {
    border-color: rgba(244, 208, 63, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(244, 208, 63, 0.2);
}

/* Team-based role card tints */
.role-card.team-werewolf {
    background: rgba(139, 0, 0, 0.25);
    border-color: rgba(180, 50, 50, 0.4);
}

.role-card.team-werewolf:hover {
    border-color: rgba(220, 80, 80, 0.6);
    box-shadow: 0 12px 40px rgba(139, 0, 0, 0.3);
}

.role-card.team-village {
    background: rgba(26, 35, 126, 0.25);
    border-color: rgba(63, 81, 181, 0.4);
}

.role-card.team-village:hover {
    border-color: rgba(100, 180, 255, 0.6);
    box-shadow: 0 12px 40px rgba(26, 35, 126, 0.3);
}

.role-card.team-solo {
    background: rgba(139, 69, 19, 0.25);
    border-color: rgba(170, 110, 60, 0.4);
}

.role-card.team-solo:hover {
    border-color: rgba(200, 140, 80, 0.6);
    box-shadow: 0 12px 40px rgba(139, 69, 19, 0.3);
}

.role-card.team-variable {
    background: rgba(128, 0, 128, 0.25);
    border-color: rgba(180, 80, 180, 0.4);
}

.role-card.team-variable:hover {
    border-color: rgba(220, 120, 220, 0.6);
    box-shadow: 0 12px 40px rgba(128, 0, 128, 0.3);
}

/* Role section headers and grids */
.roles-section-header {
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(244, 208, 63, 0.3);
}

.roles-grid > .roles-section-header:first-child {
    margin-top: 0;
}

.roles-section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    margin-bottom: 4px;
}

.roles-section-description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.roles-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
    gap: 20px;
    margin-bottom: 10px;
}

.role-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 8px;
    min-width: 0;
}

.role-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.role-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.role-description {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.role-max-count {
    font-size: 0.9rem;
    color: var(--color-accent-secondary, #f0ad4e);
    background: rgba(240, 173, 78, 0.15);
    border: 1px solid rgba(240, 173, 78, 0.3);
    border-radius: 4px;
    padding: 4px 10px;
    margin-bottom: 12px;
    display: inline-block;
    font-weight: 600;
}

.role-team {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--color-accent-primary);
    margin-bottom: 15px;
    font-weight: var(--font-weight-semibold);
}

.role-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.role-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    background: var(--color-glass-bg-light);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quantity-btn:hover:not(:disabled) {
    background: rgba(244, 208, 63, 0.3);
    border-color: var(--color-accent-primary);
    transform: scale(1.1);
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-display {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    min-width: 55px;
    text-align: center;
}

/* ============================================
   CONFIGURATION SUMMARY
   ============================================ */

.config-summary {
    background: rgba(244, 208, 63, 0.15);
    border: var(--border-width-thick) solid rgba(244, 208, 63, 0.4);
    border-radius: var(--radius-xl);
    padding: 35px 45px;
    margin-bottom: 40px;
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
}

.config-summary-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    margin-bottom: 25px;
}

.config-summary-content {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.summary-stat {
    font-size: 1.8rem;
    color: var(--color-text-primary);
}

.summary-stat-label {
    color: var(--color-text-secondary);
    margin-right: 10px;
}

.summary-stat-value {
    color: var(--color-accent-primary);
    font-weight: bold;
    font-size: 2.2rem;
}

/* ============================================
   CONFIGURATION ACTIONS
   ============================================ */

.config-actions {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 50px;
}

.btn-config {
    font-family: var(--font-heading);
    font-size: 2rem;
    padding: 20px 60px;
    border-radius: var(--radius-lg);
    font-weight: bold;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.btn-config:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-config:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(70%);
    transform: none;
    box-shadow: none;
}

/* ============================================
   VALIDATION MESSAGE
   ============================================ */

.validation-message {
    background: rgba(139, 0, 0, 0.2);
    border: var(--border-width-base) solid rgba(139, 0, 0, 0.5);
    border-radius: var(--radius-lg);
    padding: 25px 35px;
    margin-bottom: 30px;
    font-size: 1.6rem;
    color: var(--color-danger-bright);
    text-align: center;
    display: none;
}

.validation-message.show {
    display: block;
}

/* ============================================
   TIMER CONFIGURATION
   ============================================ */

.timer-config {
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
}

.timer-toggle {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 38px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-glass-bg-light);
    transition: var(--transition-base);
    border-radius: 38px;
    border: var(--border-width-base) solid var(--color-glass-border-bright);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 28px;
    width: 28px;
    left: 3px;
    bottom: 3px;
    background-color: var(--color-text-primary);
    transition: var(--transition-base);
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: rgba(244, 208, 63, 0.4);
    border-color: var(--color-accent-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(32px);
    background-color: var(--color-accent-primary);
}

.timer-toggle-label {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

.timer-duration-config {
    padding-left: 90px;
}

.timer-duration-label {
    font-size: 1.3rem;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.timer-duration-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.timer-duration-display {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    min-width: 150px;
    text-align: center;
    text-shadow: var(--glow-moon);
}

.timer-presets {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.timer-preset-btn {
    background: var(--color-glass-bg);
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.timer-preset-btn:hover {
    background: rgba(244, 208, 63, 0.2);
    border-color: rgba(244, 208, 63, 0.5);
}

.timer-preset-btn.active {
    background: rgba(244, 208, 63, 0.3);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.timer-hint {
    font-size: 1rem;
    color: var(--color-text-tertiary);
}

.timer-disabled-hint {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    padding-left: 90px;
    font-style: italic;
}

/* ============================================
   DAY PHASE STYLES
   ============================================ */

.day-phase-host-display {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.discussion-timer-container {
    background: rgba(244, 208, 63, 0.15);
    border: var(--border-width-base) solid rgba(244, 208, 63, 0.4);
    border-radius: var(--radius-lg);
    padding: 15px;
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
}

.timer-display-large {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    text-shadow: var(--glow-moon-bright);
    margin: 10px 0;
}

.timer-display-large.timer-warning {
    color: #ff9800;
    animation: pulse-warning 1s infinite;
}

.timer-display-large.timer-critical {
    color: var(--color-danger-bright);
    animation: pulse-critical 0.5s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-critical {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.discussion-info {
    background: var(--color-glass-bg-light);
    border-radius: var(--radius-lg);
    padding: 15px;
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
}

.discussion-tips {
    background: var(--color-glass-bg-light);
    border-radius: var(--radius-lg);
    padding: 15px;
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
    text-align: left;
}

.discussion-tips ul {
    padding-left: 20px;
    margin: 8px 0 0 0;
}

.discussion-tips li {
    margin-bottom: 5px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.discussion-tips h4,
.voting-progress h4,
.voting-visualization h4,
.discussion-timer-container h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--color-accent-primary);
}

/* ============================================
   VOTING PROGRESS & VISUALIZATION
   ============================================ */

.voting-progress {
    background: rgba(40, 167, 69, 0.15);
    border: var(--border-width-base) solid rgba(40, 167, 69, 0.4);
    border-radius: var(--radius-lg);
    padding: 15px;
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    text-align: center;
}

.vote-stats {
    font-size: 1.2rem;
    color: var(--color-text-primary);
    margin-top: 8px;
}

.vote-stat strong {
    color: var(--color-success);
    font-size: 1.5rem;
}

/* ============================================
   DAY PHASE ROLES SECTION
   ============================================ */

.day-phase-roles-section {
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: 15px;
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    text-align: center;
}

.day-phase-roles-section h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--color-accent-primary);
}

.day-phase-roles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.day-phase-role-card {
    background: var(--color-glass-bg);
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    border-radius: var(--radius-lg);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-base);
}

.day-phase-role-card:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 208, 63, 0.4);
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.15);
}

.day-phase-role-icon {
    font-size: 1.4rem;
}

.day-phase-role-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

.day-phase-role-count {
    font-size: 0.85rem;
    color: var(--color-accent-primary);
    font-weight: var(--font-weight-semibold);
}

.voting-visualization {
    background: var(--color-glass-bg-light);
    border-radius: var(--radius-lg);
    padding: 15px;
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
}

.player-vote-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.player-vote-card {
    background: var(--color-glass-bg);
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    border-radius: var(--radius-lg);
    padding: 12px;
    backdrop-filter: blur(var(--blur-base));
    -webkit-backdrop-filter: blur(var(--blur-base));
    transition: all var(--transition-base);
}

.player-vote-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.player-vote-card.has-voted {
    border-color: rgba(244, 208, 63, 0.5);
}

.player-vote-card.committed {
    border-color: rgba(40, 167, 69, 0.7);
    background: rgba(40, 167, 69, 0.15);
}

.player-vote-card .player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-glass-border);
}

.player-avatar-large {
    font-size: 1.8rem;
}

.player-name-large {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

.vote-info {
    color: var(--color-text-primary);
}

.voting-for {
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.voting-for strong {
    color: var(--color-accent-primary);
}

.committed-badge {
    display: inline-block;
    background: var(--color-success);
    color: var(--color-text-primary);
    padding: 2px 6px;
    border-radius: var(--radius-base);
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 4px;
}

.soft-badge {
    display: inline-block;
    background: #ff9800;
    color: var(--color-text-primary);
    padding: 2px 6px;
    border-radius: var(--radius-base);
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 4px;
}

.not-voted {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.receiving-votes {
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 5px;
}

.receiving-votes strong {
    color: var(--color-danger-bright);
    font-size: 1.1rem;
}

/* ============================================
   GAMEPAD NAVIGATION
   ============================================ */

.gamepad-focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 208, 63, 0.6), var(--glow-moon) !important;
    border-color: var(--color-accent-primary) !important;
    transform: scale(1.02);
    transition: all var(--transition-fast);
}

.gamepad-focus.quantity-btn {
    transform: scale(1.15);
}

.gamepad-focus.btn-start-game,
.gamepad-focus.btn-configure,
.gamepad-focus.btn-config {
    transform: translateY(-3px) scale(1.02);
}

/* Hide focus indicator when using mouse */
body.using-mouse .gamepad-focus {
    box-shadow: none !important;
    transform: none;
}

body.using-mouse .gamepad-focus.quantity-btn {
    transform: none;
}

body.using-mouse .gamepad-focus.btn-start-game,
body.using-mouse .gamepad-focus.btn-configure,
body.using-mouse .gamepad-focus.btn-config,
body.using-mouse .gamepad-focus.qr-toggle {
    transform: none;
}

/* Gamepad connection indicator */
.gamepad-indicator {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    background: var(--color-overlay-dark);
    border-radius: var(--radius-base);
    font-size: 0.9rem;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.gamepad-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

.gamepad-indicator .icon {
    font-size: 1.2rem;
}

/* Section styling for gamepad navigation */
.gamepad-section {
    position: relative;
}

/* ============================================
   HOW TO PLAY BUTTON & MODAL
   ============================================ */

.how-to-play-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    color: var(--color-text-secondary);
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 1001;
}

.how-to-play-btn:hover {
    background: rgba(244, 208, 63, 0.2);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.how-to-play-btn:active {
    transform: scale(0.95);
}

.how-to-play-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-dark);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.how-to-play-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.how-to-play-content {
    min-height: 100%;
    max-width: 95vw;
    margin: 0 auto;
    padding: 30px 40px;
    padding-top: 60px;
}

.how-to-play-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.how-to-play-header h2 {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--color-accent-primary);
    margin: 0;
}

.how-to-play-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    color: var(--color-text-secondary);
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-base);
}

.how-to-play-close-btn:hover {
    background: rgba(244, 208, 63, 0.2);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.how-to-play-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.how-to-play-section {
    padding: 25px;
    background: var(--color-glass-bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-glass-border);
}

.how-to-play-section-wide {
    grid-column: span 3;
}

.how-to-play-section h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-accent-primary);
    margin: 0 0 15px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(244, 208, 63, 0.3);
}

.how-to-play-subtitle {
    font-size: 1rem;
    font-weight: normal;
    color: var(--color-text-secondary);
    font-style: italic;
}

.how-to-play-section h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-accent-primary);
    margin: 20px 0 12px 0;
}

.how-to-play-section p,
.how-to-play-section li {
    font-size: 1.3rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.how-to-play-section ul {
    padding-left: 25px;
    margin: 0;
}

.how-to-play-section li {
    margin-bottom: 10px;
}

.how-to-play-section strong {
    color: var(--color-accent-primary);
}

.how-to-play-emoji {
    font-size: 1.6rem;
    margin-right: 10px;
}

/* Role team colors in how-to-play */
.how-to-play-section .role-village {
    color: #64b5f6;
    text-shadow: 0 0 8px rgba(100, 181, 246, 0.4);
}

.how-to-play-section .role-werewolf {
    color: #ef5350;
    text-shadow: 0 0 8px rgba(239, 83, 80, 0.4);
}

.how-to-play-section .role-solo {
    color: #ce93d8;
    text-shadow: 0 0 8px rgba(206, 147, 216, 0.4);
}

/* Role Abilities Grid */
.role-abilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.role-testing-note {
    grid-column: 1 / -1;
    padding: 10px 15px;
    background: rgba(255, 165, 0, 0.15);
    border: 1px solid rgba(255, 165, 0, 0.4);
    border-radius: var(--radius-md);
    color: #ffcc66;
    font-size: 1rem;
    margin-bottom: 5px;
}

.role-ability-card {
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.role-ability-card strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.role-ability-card p {
    font-size: 1.1rem;
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.role-ability-card .role-action {
    margin-bottom: 6px;
}

.role-ability-card .role-win {
    margin-bottom: 6px;
    color: var(--color-gold);
}

.role-ability-card .role-tip {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-style: italic;
    font-size: 1rem;
}

/* Responsive: 2 columns for medium screens */
@media (max-width: 1400px) {
    .how-to-play-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .how-to-play-section-wide {
        grid-column: span 2;
    }
    .role-abilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 1 column for small screens */
@media (max-width: 900px) {
    .how-to-play-content {
        padding: 20px;
        padding-top: 60px;
    }
    .how-to-play-header h2 {
        font-size: 2rem;
    }
    .how-to-play-grid {
        grid-template-columns: 1fr;
    }
    .how-to-play-section-wide {
        grid-column: span 1;
    }
    .how-to-play-section h3 {
        font-size: 1.3rem;
    }
    .how-to-play-section h4 {
        font-size: 1.1rem;
    }
    .how-to-play-section p,
    .how-to-play-section li {
        font-size: 1rem;
    }
    .role-abilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .role-ability-card strong {
        font-size: 1rem;
    }
    .role-ability-card p {
        font-size: 0.9rem;
    }
}

/* ============================================
   END GAME CONFIRMATION MODAL
   ============================================ */

.end-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay-dark);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.end-game-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.end-game-modal {
    background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg-dark) 100%);
    border: var(--border-width-thick) solid rgba(244, 208, 63, 0.5);
    border-radius: var(--radius-xl);
    padding: 40px 50px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow-2xl), var(--glow-moon);
    transform: scale(0.9);
    transition: transform var(--transition-base);
}

.end-game-overlay.visible .end-game-modal {
    transform: scale(1);
}

.end-game-modal h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-accent-primary);
    margin: 0 0 20px 0;
    text-shadow: var(--glow-moon);
}

.end-game-modal p {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.end-game-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.end-game-btn {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    padding: 15px 40px;
    border-radius: var(--radius-lg);
    font-weight: bold;
    border: var(--border-width-base) solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 140px;
}

.end-game-btn-cancel {
    background: var(--color-glass-bg);
    border-color: var(--color-glass-border-bright);
    color: var(--color-text-primary);
}

.end-game-btn-cancel:hover,
.end-game-btn-cancel.gamepad-focus {
    background: var(--color-glass-bg-light);
    border-color: var(--color-text-secondary);
    transform: translateY(-2px);
}

.end-game-btn-confirm {
    background: rgba(139, 0, 0, 0.8);
    border-color: var(--color-danger-bright);
    color: var(--color-text-primary);
}

.end-game-btn-confirm:hover,
.end-game-btn-confirm.gamepad-focus {
    background: var(--color-danger);
    border-color: var(--color-danger-bright);
    transform: translateY(-2px);
    box-shadow: var(--glow-werewolf);
}

.end-game-hint {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.end-game-hint kbd {
    background: var(--color-glass-bg);
    border: 1px solid var(--color-glass-border-bright);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-family: var(--font-mono);
    margin: 0 3px;
}

/* ============================================
   FOCUSABLE PLAYER CARDS IN LOBBY
   ============================================ */

.player-list .tv-player-card[data-focusable]:focus {
    outline: none;
}

.player-list .tv-player-card[data-focusable].gamepad-focus,
.player-list .tv-player-card[data-focusable]:focus-visible {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px rgba(244, 208, 63, 0.4), 0 12px 40px rgba(244, 208, 63, 0.3);
    transform: translateY(-5px) scale(1.02);
}

/* ============================================
   REMOVE PLAYER CONFIRMATION MODAL
   ============================================ */

.remove-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay-dark);
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-player-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.remove-player-modal {
    background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg-dark) 100%);
    border: var(--border-width-thick) solid rgba(244, 208, 63, 0.5);
    border-radius: var(--radius-xl);
    padding: 40px 50px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow-2xl), var(--glow-moon);
    transform: scale(0.9);
    transition: transform var(--transition-base);
}

.remove-player-overlay.visible .remove-player-modal {
    transform: scale(1);
}

.remove-player-modal h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-accent-primary);
    margin: 0 0 20px 0;
    text-shadow: var(--glow-moon);
}

.remove-player-modal p {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.remove-player-modal .player-name {
    color: var(--color-accent-primary);
    font-weight: bold;
}

.remove-player-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.remove-player-btn {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    padding: 15px 40px;
    border-radius: var(--radius-lg);
    font-weight: bold;
    border: var(--border-width-base) solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 140px;
}

.remove-player-btn-cancel {
    background: var(--color-glass-bg);
    border-color: var(--color-glass-border-bright);
    color: var(--color-text-primary);
}

.remove-player-btn-cancel:hover,
.remove-player-btn-cancel.gamepad-focus {
    background: var(--color-glass-bg-light);
    border-color: var(--color-text-secondary);
    transform: translateY(-2px);
}

.remove-player-btn-confirm {
    background: rgba(139, 0, 0, 0.8);
    border-color: var(--color-danger-bright);
    color: var(--color-text-primary);
}

.remove-player-btn-confirm:hover,
.remove-player-btn-confirm.gamepad-focus {
    background: var(--color-danger);
    border-color: var(--color-danger-bright);
    transform: translateY(-2px);
    box-shadow: var(--glow-werewolf);
}

.remove-player-hint {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.remove-player-hint kbd {
    background: var(--color-glass-bg);
    border: 1px solid var(--color-glass-border-bright);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-family: var(--font-mono);
    margin: 0 3px;
}

/* ============================================
   PHASE TRANSITION OVERLAY
   ============================================ */

.phase-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.phase-transition-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.transition-content {
    text-align: center;
}

.transition-icon {
    font-size: 6rem;
    margin-bottom: 30px;
    animation: transition-pulse 1s ease-in-out infinite;
}

.transition-text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-accent-primary);
    text-shadow: var(--glow-moon);
}

@keyframes transition-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ============================================
   CLASH ANIMATION OVERLAY
   ============================================ */

.clash-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    overflow: hidden;
}

.clash-animation-overlay.visible {
    display: block;
}

/* Arena Environment */
.clash-arena {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(ellipse at center bottom, #1a1a2e 0%, #0a0a12 100%);
}

.clash-arena.shake {
    animation: screenShake 0.4s ease-out;
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-10px, -5px); }
    20% { transform: translate(10px, 5px); }
    30% { transform: translate(-10px, 5px); }
    40% { transform: translate(10px, -5px); }
    50% { transform: translate(-5px, 10px); }
    60% { transform: translate(5px, -10px); }
    70% { transform: translate(-5px, -5px); }
    80% { transform: translate(5px, 5px); }
    90% { transform: translate(-2px, 2px); }
}

/* Moon (clash arena version) */
.clash-moon {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at 30% 30%, #fef9c3, #fde68a, #a3a3a3);
    border-radius: 50%;
    box-shadow:
        0 0 60px rgba(254, 249, 195, 0.4),
        0 0 120px rgba(254, 249, 195, 0.2);
    opacity: 1;
}

.clash-moon::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 55%;
    width: 30px;
    height: 30px;
    background: rgba(120, 120, 120, 0.3);
    border-radius: 50%;
}

.clash-moon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 25%;
    width: 20px;
    height: 20px;
    background: rgba(120, 120, 120, 0.25);
    border-radius: 50%;
}

/* Ground/Fog */
.clash-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, #1a1a2e, transparent);
}

.clash-fog {
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 300%;
    height: 200px;
    background:
        radial-gradient(ellipse at 20% 100%, rgba(100, 100, 120, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(100, 100, 120, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(100, 100, 120, 0.3) 0%, transparent 50%);
    animation: fogDrift 20s linear infinite;
}

@keyframes fogDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(33.33%); }
}

/* Teams */
.clash-team {
    position: absolute;
    bottom: 15%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease-out;
}

.clash-team-village {
    left: -300px;
}

.clash-team-werewolf {
    right: -300px;
}

/* Teams enter from sides */
.clash-team.enter {
    opacity: 1;
    transition: all 0.5s ease-out;
}

.clash-team-village.enter {
    left: 15%;
}

.clash-team-werewolf.enter {
    right: 15%;
}

/* Teams charge toward center */
.clash-team.charge {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.clash-team-village.charge {
    left: 35%;
}

.clash-team-werewolf.charge {
    right: 35%;
}

.clash-team.clash {
    opacity: 0;
    transition: opacity 0.2s;
}

/* Village Team Visuals */
.clash-villagers {
    display: flex;
    gap: 10px;
    position: relative;
}

.clash-villager {
    width: 60px;
    height: 120px;
    position: relative;
}

.clash-villager-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 80px;
    background: linear-gradient(to bottom, #78350f, #451a03);
    border-radius: 20px 20px 10px 10px;
}

.clash-villager-head {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 35px;
    background: #fcd9b6;
    border-radius: 50%;
}

.clash-torch {
    position: absolute;
    bottom: 60px;
    left: 70%;
    width: 8px;
    height: 50px;
    background: linear-gradient(to top, #78350f, #a16207);
    border-radius: 2px;
}

.clash-flame {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 35px;
    background: radial-gradient(ellipse at bottom, #fef08a, #f59e0b, #dc2626, transparent);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.15s infinite alternate;
    box-shadow: 0 0 20px #f59e0b, 0 0 40px rgba(245, 158, 11, 0.5);
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1) rotate(-2deg); }
    100% { transform: translateX(-50%) scale(1.1) rotate(2deg); }
}

.clash-team-label {
    margin-top: 30px;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.clash-team-village .clash-team-label {
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.clash-team-werewolf .clash-team-label {
    color: #a78bfa;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
}

/* Werewolf Team Visuals */
.clash-werewolves {
    display: flex;
    gap: 15px;
}

.clash-werewolf {
    width: 80px;
    height: 130px;
    position: relative;
}

.clash-werewolf-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 90px;
    background: linear-gradient(to bottom, #374151, #1f2937);
    border-radius: 25px 25px 15px 15px;
    clip-path: polygon(0% 20%, 10% 0%, 30% 15%, 50% 5%, 70% 15%, 90% 0%, 100% 20%, 100% 100%, 0% 100%);
}

.clash-werewolf-head {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 50px;
    background: #374151;
    border-radius: 50% 50% 40% 40%;
}

.clash-werewolf-snout {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 20px;
    background: #1f2937;
    border-radius: 50%;
}

.clash-werewolf-ears {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 20px;
}

.clash-werewolf-ears::before,
.clash-werewolf-ears::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 25px solid #374151;
}

.clash-werewolf-ears::before {
    left: 0;
    transform: rotate(-15deg);
}

.clash-werewolf-ears::after {
    right: 0;
    transform: rotate(15deg);
}

.clash-werewolf-eyes {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.clash-werewolf-eye {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 15px #ef4444, 0 0 30px rgba(239, 68, 68, 0.5);
    animation: eyeGlow 1s infinite alternate;
}

@keyframes eyeGlow {
    0% { box-shadow: 0 0 10px #ef4444, 0 0 20px rgba(239, 68, 68, 0.5); }
    100% { box-shadow: 0 0 20px #ef4444, 0 0 40px rgba(239, 68, 68, 0.8); }
}

.clash-claws {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 3px;
}

.clash-claws.left {
    left: -20px;
}

.clash-claws.right {
    right: -20px;
}

.clash-claw {
    width: 4px;
    height: 20px;
    background: linear-gradient(to top, #d1d5db, #9ca3af);
    border-radius: 2px;
    transform: rotate(15deg);
}

.clash-claws.right .clash-claw {
    transform: rotate(-15deg);
}

/* Clash Effects */
.clash-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.clash-impact-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid white;
    border-radius: 50%;
    opacity: 0;
}

.clash-impact-ring.animate {
    animation: impactExpand 0.6s ease-out forwards;
}

@keyframes impactExpand {
    0% {
        width: 50px;
        height: 50px;
        opacity: 1;
    }
    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

.clash-flash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.clash-flash.animate {
    animation: flashBang 0.5s ease-out forwards;
}

@keyframes flashBang {
    0% { opacity: 0.9; }
    100% { opacity: 0; }
}

/* Particles */
.clash-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.clash-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0;
}

.clash-particle.animate {
    animation: particleBurst 1s ease-out forwards;
}

@keyframes particleBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Dust cloud */
.clash-dust-cloud {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.clash-dust {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(150, 150, 150, 0.4), transparent);
    border-radius: 50%;
    opacity: 0;
}

.clash-dust.animate {
    animation: dustExpand 1.5s ease-out forwards;
}

@keyframes dustExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(3);
        opacity: 0;
    }
}

/* Winner Reveal */
.clash-winner-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    pointer-events: none;
}

.clash-winner-reveal.show {
    opacity: 1;
    animation: winnerAppear 0.8s ease-out forwards;
}

@keyframes winnerAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.clash-winners-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
}

.clash-winner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    flex-shrink: 0;
    width: 180px;
}

.clash-winner-card.show {
    animation: cardAppear 0.6s ease-out forwards;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.clash-winner-icon {
    width: 150px;
    height: 150px;
    position: relative;
    flex-shrink: 0;
}

.clash-winners-container.single .clash-winner-card {
    width: auto;
}

.clash-winners-container.single .clash-winner-icon {
    width: 200px;
    height: 200px;
}

.clash-winners-container.single .clash-icon-symbol {
    font-size: 100px;
}

.clash-winners-container.single .clash-winner-name {
    font-size: 32px;
}

.clash-winner-icon.village .clash-icon-bg {
    background: radial-gradient(circle, #fef08a, #f59e0b);
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.6);
}

.clash-winner-icon.werewolf .clash-icon-bg {
    background: radial-gradient(circle, #a78bfa, #7c3aed);
    box-shadow: 0 0 60px rgba(124, 58, 237, 0.6);
}

.clash-winner-icon.tanner .clash-icon-bg {
    background: radial-gradient(circle, #bef264, #84cc16);
    box-shadow: 0 0 60px rgba(132, 204, 22, 0.6);
}

.clash-winner-icon.minion .clash-icon-bg {
    background: radial-gradient(circle, #f472b6, #ec4899);
    box-shadow: 0 0 60px rgba(236, 72, 153, 0.6);
}

.clash-icon-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.clash-icon-symbol {
    font-size: 70px;
}

.clash-winner-name {
    margin-top: 15px;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.clash-winner-card.village .clash-winner-name {
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

.clash-winner-card.werewolf .clash-winner-name {
    color: #a78bfa;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.6);
}

.clash-winner-card.tanner .clash-winner-name {
    color: #a3e635;
    text-shadow: 0 0 20px rgba(163, 230, 53, 0.6);
}

.clash-winner-card.minion .clash-winner-name {
    color: #f472b6;
    text-shadow: 0 0 20px rgba(244, 114, 182, 0.6);
}

.clash-ampersand {
    font-size: 48px;
    font-weight: 300;
    color: #6b7280;
    opacity: 0;
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    line-height: 150px;
}

.clash-ampersand.show {
    animation: ampersandAppear 0.4s ease-out forwards;
}

@keyframes ampersandAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.clash-victory-text {
    font-size: 42px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 12px;
    margin-top: 20px;
    background: linear-gradient(135deg, #fbbf24, #a78bfa, #a3e635);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
}

.clash-victory-text.show {
    animation: victoryAppear 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

.clash-victory-text.single-village {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
}

.clash-victory-text.single-werewolf {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
}

.clash-victory-text.single-tanner {
    background: linear-gradient(135deg, #a3e635, #84cc16);
    -webkit-background-clip: text;
    background-clip: text;
}

@keyframes victoryAppear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shared Victory glow */
.clash-shared-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.clash-shared-glow.show {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Confetti */
.clash-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.clash-confetti {
    position: absolute;
    width: 10px;
    height: 20px;
    top: -20px;
    opacity: 0;
}

.clash-confetti.animate {
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Phase container fade transitions */
.lobby-view, .game-display, .results-display {
    transition: opacity var(--transition-base);
}

.phase-exiting {
    opacity: 0;
}

/* ===== GAMEPAD HINTS BAR ===== */
.gamepad-hints-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.gamepad-hints-bar.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Always show hints bar - removed mouse-mode hiding */

.gamepad-hint {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gamepad-hint-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Base button styles */
.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 4px;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    font-size: 0.8rem;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Xbox button styles */
.gp-btn-xbox {
    border-radius: 50%;
    width: 28px;
    min-width: 28px;
    padding: 0;
}

.gp-btn-xbox.gp-btn-a {
    background: linear-gradient(145deg, #4caf50, #2e7d32);
    color: white;
}

.gp-btn-xbox.gp-btn-b {
    background: linear-gradient(145deg, #f44336, #c62828);
    color: white;
}

.gp-btn-xbox.gp-btn-x {
    background: linear-gradient(145deg, #2196f3, #1565c0);
    color: white;
}

.gp-btn-xbox.gp-btn-y {
    background: linear-gradient(145deg, #ffeb3b, #f9a825);
    color: #333;
}

.gp-btn-xbox.gp-btn-lb,
.gp-btn-xbox.gp-btn-rb {
    background: linear-gradient(145deg, #424242, #212121);
    color: white;
    border-radius: 4px;
    width: auto;
    min-width: 32px;
}

.gp-btn-xbox.gp-btn-start,
.gp-btn-xbox.gp-btn-back {
    background: linear-gradient(145deg, #424242, #212121);
    color: white;
    border-radius: 4px;
    width: auto;
    min-width: 28px;
    font-size: 1rem;
}

.gp-btn-xbox.gp-btn-dpad {
    background: linear-gradient(145deg, #616161, #424242);
    color: white;
    border-radius: 4px;
    width: auto;
    font-size: 0.7rem;
}

/* PlayStation button styles */
.gp-btn-ps {
    border-radius: 50%;
    width: 28px;
    min-width: 28px;
    padding: 0;
    font-size: 1rem;
}

.gp-btn-ps.gp-btn-cross {
    background: linear-gradient(145deg, #5c6bc0, #3949ab);
    color: white;
}

.gp-btn-ps.gp-btn-circle {
    background: linear-gradient(145deg, #ef5350, #c62828);
    color: white;
}

.gp-btn-ps.gp-btn-square {
    background: linear-gradient(145deg, #ec407a, #ad1457);
    color: white;
}

.gp-btn-ps.gp-btn-triangle {
    background: linear-gradient(145deg, #26a69a, #00796b);
    color: white;
}

.gp-btn-ps.gp-btn-l1,
.gp-btn-ps.gp-btn-r1 {
    background: linear-gradient(145deg, #37474f, #263238);
    color: white;
    border-radius: 4px;
    width: auto;
    min-width: 32px;
    font-size: 0.75rem;
}

.gp-btn-ps.gp-btn-options,
.gp-btn-ps.gp-btn-share {
    background: linear-gradient(145deg, #37474f, #263238);
    color: white;
    border-radius: 4px;
    width: auto;
    min-width: auto;
    font-size: 0.65rem;
    padding: 0 8px;
}

.gp-btn-ps.gp-btn-dpad {
    background: linear-gradient(145deg, #546e7a, #37474f);
    color: white;
    border-radius: 4px;
    width: auto;
    font-size: 0.7rem;
}

/* Keyboard key styles (for when no controller is connected) */
.kb-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 32px;
    height: 28px;
    padding: 0 10px;
    background: linear-gradient(to bottom, #4a4a4a, #2d2d2d);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.kb-key.kb-arrows {
    letter-spacing: 2px;
    min-width: 60px;
}

/* Keyboard mode styling - subtle indicator */
.gamepad-hints-bar.keyboard-mode {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.75));
}

/* Responsive adjustments for hints bar */
@media (max-width: 768px) {
    .gamepad-hints-bar {
        gap: 16px;
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .gamepad-hint-label {
        font-size: 0.8rem;
    }

    .gp-btn {
        min-width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .gp-btn-xbox,
    .gp-btn-ps {
        width: 24px;
        min-width: 24px;
    }

    .kb-key {
        min-width: 28px;
        height: 24px;
        padding: 0 8px;
        font-size: 0.7rem;
    }

    .kb-key.kb-arrows {
        min-width: 50px;
    }
}

/* Add bottom padding to views when hints bar is visible */
.gamepad-hints-bar.visible ~ .lobby-view,
.gamepad-hints-bar.visible ~ .config-view,
.gamepad-hints-bar.visible ~ .game-view {
    padding-bottom: 60px;
}

/* ============================================
   AUDIT LOG MODAL
   ============================================ */

.audit-btn {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    padding: var(--spacing-5) var(--spacing-12);
    border-radius: var(--radius-lg);
    background: var(--color-glass-bg);
    border: var(--border-width-thick) solid var(--color-glass-border-bright);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    margin-right: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-lg);
}

.audit-btn:hover {
    background: rgba(244, 208, 63, 0.2);
    border-color: var(--color-accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--glow-moon);
}

.audit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay-dark);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.audit-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.audit-modal {
    background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg-dark) 100%);
    border: var(--border-width-thick) solid rgba(244, 208, 63, 0.5);
    border-radius: var(--radius-xl);
    padding: 30px 40px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    box-shadow: var(--shadow-2xl), var(--glow-moon);
    transform: scale(0.9);
    transition: transform var(--transition-base);
    display: flex;
    flex-direction: column;
}

.audit-overlay.visible .audit-modal {
    transform: scale(1);
}

.audit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(244, 208, 63, 0.3);
}

.audit-modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-accent-primary);
    margin: 0;
    text-shadow: var(--glow-moon);
}

.audit-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    color: var(--color-text-secondary);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-base);
}

.audit-close-btn:hover {
    background: rgba(244, 208, 63, 0.2);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.audit-log-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 10px;
    max-height: 600px; /* Show ~12 rows with scrollbar for more */
}

.audit-log-empty {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    padding: 30px;
}

.audit-log-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.audit-log-entry {
    background: var(--color-glass-bg);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--color-text-primary);
    line-height: 1.4;
}

.audit-log-entry:last-child {
    margin-bottom: 0;
}

.audit-log-entry:hover {
    border-color: rgba(244, 208, 63, 0.3);
    background: rgba(244, 208, 63, 0.05);
}

/* Custom scrollbar for audit log */
.audit-log-content::-webkit-scrollbar {
    width: 8px;
}

.audit-log-content::-webkit-scrollbar-track {
    background: var(--color-glass-bg);
    border-radius: 4px;
}

.audit-log-content::-webkit-scrollbar-thumb {
    background: rgba(244, 208, 63, 0.4);
    border-radius: 4px;
}

.audit-log-content::-webkit-scrollbar-thumb:hover {
    background: rgba(244, 208, 63, 0.6);
}

/* ============================================
   AUTHENTICATION OVERLAY
   ============================================ */

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-bg-primary) 0%, #1a0a2e 50%, var(--color-bg-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.auth-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-container {
    text-align: center;
    padding: 60px;
    background: var(--color-glass-bg);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
}

.auth-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--color-accent-primary);
    text-shadow: var(--glow-moon);
}

.auth-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.auth-description {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    line-height: 1.5;
}

.auth-google-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: #fff;
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-google-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.auth-google-btn:active {
    transform: translateY(0);
}

.auth-google-btn .google-icon {
    width: 24px;
    height: 24px;
}

.auth-note {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 25px;
    opacity: 0.8;
}

.auth-whats-new-link {
    display: inline-block;
    margin-top: 25px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    color: var(--color-accent-primary);
    text-decoration: none;
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-accent-primary);
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.auth-whats-new-link:hover {
    color: var(--color-text-on-accent);
    background: var(--color-accent-primary);
    box-shadow: var(--glow-moon);
    transform: translateY(-2px);
}

/* ============================================
   LOGOUT BUTTON (matches help button style)
   ============================================ */

.host-logout-btn {
    position: fixed;
    top: 10px;
    right: 60px; /* Position left of the help button */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    color: var(--color-text-secondary);
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 1001;
}

.host-logout-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: var(--color-danger-bright);
    color: var(--color-danger-bright);
}

.host-logout-btn:active {
    transform: scale(0.95);
}

.host-logout-btn svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   HISTORY BUTTON (matches help/logout button style)
   ============================================ */

.host-history-btn {
    position: fixed;
    top: 10px;
    right: 110px; /* Position left of the logout button */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    color: var(--color-text-secondary);
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 1001;
}

.host-history-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: var(--color-accent-bright);
    color: var(--color-accent-bright);
}

.host-history-btn:active {
    transform: scale(0.95);
}

.host-history-btn svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   HOME BUTTON (matches help/logout button style)
   ============================================ */

.host-home-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-glass-bg-light);
    border: var(--border-width-base) solid var(--color-glass-border-bright);
    color: var(--color-text-secondary);
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 1001;
}

.host-home-btn:hover {
    background: rgba(244, 208, 63, 0.2);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.host-home-btn:active {
    transform: scale(0.95);
}

.host-home-btn svg {
    width: 20px;
    height: 20px;
}
