.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
.joker-rule-box {
    background: rgba(44, 62, 80, 0.2);
    border: 1px solid;
    border-radius: 4px;
    padding: 14px;
    margin: 12px 0;
    transition: all 0.25s ease;
}
.joker-rule-box h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}
.joker-rule-box p {
    margin: 0;
    line-height: 1.5;
}
.joker-rule-avalanche {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
}
.joker-rule-avalanche h4 {
    color: #e74c3c;
}
.joker-rule-avalanche p {
    color: #ec7063;
}
.joker-rule-steal {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.15);
}
.joker-rule-steal h4 {
    color: #f39c12;
}
.joker-rule-steal p {
    color: #f7dc6f;
}
.joker-rule-combo {
    border-color: #9b59b6;
    background: rgba(155, 89, 182, 0.15);
}
.joker-rule-combo h4 {
    color: #9b59b6;
}
.joker-rule-combo p {
    color: #bb8fce;
}
.nightmare-event-box {
    background: rgba(44, 62, 80, 0.2);
    border: 1px solid;
    border-radius: 4px;
    padding: 14px;
    margin: 12px 0;
    transition: all 0.25s ease;
}
.nightmare-event-box h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}
.nightmare-event-box p {
    margin: 0;
    line-height: 1.5;
}
.nightmare-event-bomb {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.15);
}
.nightmare-event-bomb h4 {
    color: #f44336;
}
.nightmare-event-bomb p {
    color: #ef5350;
}
.nightmare-event-ghost {
    border-color: #9c27b0;
    background: rgba(156, 39, 176, 0.15);
}
.nightmare-event-ghost h4 {
    color: #9c27b0;
}
.nightmare-event-ghost p {
    color: #ba68c8;
}
.nightmare-event-swap {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.15);
}
.nightmare-event-swap h4 {
    color: #ffc107;
}
.nightmare-event-swap p {
    color: #ffd54f;
}
.nightmare-event-reverse {
    border-color: #00bcd4;
    background: rgba(0, 188, 212, 0.15);
}
.nightmare-event-reverse h4 {
    color: #00bcd4;
}
.nightmare-event-reverse p {
    color: #4dd0e1;
}
body {
    background: linear-gradient(160deg, #0b1d3a 0%, #112d58 30%, #1c4278 58%, #0d2040 100%);
    color: #b3e5fc;
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    text-align: center;
    min-height: 100vh;
    margin: 0;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 72px 0 60px;
    box-sizing: border-box;
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
body.loaded {
    opacity: 1;
}
h1, h2, h3, h4 {
    color: #e3f2fd;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
}

/* ── Sidebars équipes latérales ── */
.teams-sidebar-fixed {
    position: fixed;
    top: 68px;
    bottom: 58px;
    width: 220px;
    left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
    padding: 4px 4px 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(33, 150, 243, 0.3) transparent;
}
.teams-sidebar-fixed::-webkit-scrollbar {
    width: 4px;
}
.teams-sidebar-fixed::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.3);
    border-radius: 2px;
}
.teams-sidebar-right {
    left: auto;
    right: 10px;
    padding: 4px 0 4px 4px;
}
.teams-sidebar-fixed .team {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    backdrop-filter: blur(10px);
    background: rgba(16, 36, 72, 0.78);
    border: 1px solid rgba(33, 150, 243, 0.3);
}
.teams-sidebar-fixed .team h4 {
    font-size: 11px;
    margin-bottom: 8px;
    color: #90caf9;
    letter-spacing: 1px;
}
.teams-sidebar-fixed .role-section {
    padding: 7px 10px;
    margin: 4px 0;
}
.teams-sidebar-fixed .role-section h5 {
    font-size: 9px;
    margin-bottom: 4px;
}
.teams-sidebar-fixed .team-players {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0;
}
.teams-sidebar-fixed .team-players li {
    font-size: 11px;
    padding: 2px 4px;
    text-align: left;
    justify-content: flex-start;
    width: 100%;
}
/* Desktop: wrapper transparent, sidebars flottent en fixed */
#teams-wrapper {
    display: contents;
}

/* ── Cadre central de jeu ── */
.game-center-frame {
    background: rgba(14, 30, 62, 0.76);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(167, 139, 250, 0.50);
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(100, 180, 255, 0.07);
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* Marge gauche = teams-left (10 + 220 + 10 gap) pour éviter tout chevauchement */
    margin-left: 240px;
    margin-right: 240px;
    width: calc(100vw - 480px);
    max-width: 940px;
    min-width: 380px;
    box-sizing: border-box;
    position: relative;
}
.game-center-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(80, 190, 255, 0.7), transparent);
    border-radius: 2px;
}
/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — 3 paliers
   > 1024px  : sidebars fixes, frame centrée entre elles
   601-1024px : sidebars masquées, frame pleine largeur centrée
   ≤ 600px   : pas de sidebars, équipes empilées en colonne sous la frame
───────────────────────────────────────────────────────────── */

/* Sidebar légèrement réduite entre 1025 et 1280px */
@media screen and (max-width: 1280px) and (min-width: 1025px) {
    .teams-sidebar-fixed {
        width: 185px;
    }
    .game-center-frame {
        margin-left: 205px;
        margin-right: 205px;
        width: calc(100vw - 410px);
    }
}

/* Tablette (601-1024px) : sidebars en flow, pas de fixed */
@media screen and (max-width: 1024px) and (min-width: 601px) {
    .teams-sidebar-fixed {
        position: static;
        display: flex;
        width: calc(50% - 5px);
        height: auto;
        max-height: none;
        overflow-y: visible;
        left: auto;
        right: auto;
        bottom: auto;
        top: auto;
        padding: 0;
        z-index: 1;
        justify-content: flex-start;
    }
    .teams-sidebar-right {
        right: auto;
        left: auto;
    }
    #teams-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 88%;
        max-width: 700px;
        flex-shrink: 0;
        padding-bottom: 16px;
        margin-top: 14px;
    }
    .teams-sidebar-fixed .team {
        width: 100%;
    }
    .game-center-frame {
        width: 88%;
        max-width: 700px;
        min-width: 0;
    }
}

/* Mobile (≤ 600px) : frame full-width, équipes en colonne sous la frame */
@media screen and (max-width: 600px) {
    .game-center-frame {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        border-radius: 3px;
        padding: 14px 8px 16px;
        gap: 10px;
    }
    #teams-wrapper {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: calc(100% - 16px);
        flex-shrink: 0;
        padding-bottom: 20px;
        margin-top: 12px;
    }
    /* display:contents : les .team deviennent des flex items de #teams-wrapper
       pour pouvoir les trier (order) — sinon gauche puis droite = 1,3 puis 2,4 */
    .teams-sidebar-fixed {
        position: static;
        display: contents;
        height: auto;
        max-height: none;
        overflow-y: visible;
        left: auto;
        right: auto;
        bottom: auto;
        padding: 0;
        z-index: 1;
    }
    .teams-sidebar-right {
        right: auto;
        left: auto;
    }
    .teams-sidebar-fixed .team {
        width: 100%;
    }
    #teams-wrapper .team#team-duo { order: 1; }
    #teams-wrapper .team#team-1 { order: 1; }
    #teams-wrapper .team#team-2 { order: 2; }
    #teams-wrapper .team#team-3 { order: 3; }
    #teams-wrapper .team#team-4 { order: 4; }
    /* Centrage texte équipes sur mobile */
    .teams-sidebar-fixed .team h4,
    .teams-sidebar-fixed .role-section h5,
    .teams-sidebar-fixed .team-players li {
        text-align: center;
        justify-content: center;
    }
    .teams-sidebar-fixed .team-players {
        align-items: center;
    }
}

@media screen and (min-width: 601px) and (max-height: 900px) {
    body {
        padding-top: 52px;
        padding-bottom: 52px;
    }
    .header-wrapper {
        height: 45px;
        padding: 0 15px;
    }
    #header-container {
        gap: 12px;
    }
    #game-container {
        gap: 10px;
    }
    .left-column {
        gap: 10px;
    }
    #gameplay {
        padding: 12px;
    }
    .game-console {
        height: 100px;
    }
    #word-to-guess {
        font-size: 16px;
        padding: 10px 15px;
        margin: 6px 0;
    }
    #timer {
        font-size: 20px;
        padding: 8px 12px;
        margin: 6px 0;
    }
    .score-box {
        padding: 8px 12px;
        min-width: 80px;
    }
    .team-label {
        font-size: 12px;
        margin-bottom: 3px;
    }
    .score {
        font-size: 18px;
    }
    #pass-button, #validate-button, #reveal-word-button {
        font-size: 12px;
        padding: 6px 12px;
        margin: 3px;
    }
    .footer-admin {
        height: 45px;
        padding: 0 15px;
    }
    .home-icon, .menu-icon, .rules-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
    }
    .volume-control i {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
    }
    #volume-slider {
        width: 90px;
    }
}
@media screen and (min-width: 601px) {
    #header-container {
        position: relative;
        display: flex;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        border: none;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
    #game-container {
        display: flex;
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
        width: 100%;
        margin: 0;
        background: transparent;
        padding: 0;
        border: none;
        box-shadow: none;
    }
    #header-container::before {
        display: none;
    }
    .left-column {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    #gameplay {
        width: 100%;
        margin: 0;
    }
    .game-console {
        width: 100%;
        margin: 0;
    }
    .side-menu {
        padding: 20px;
    }
}
@media screen and (max-width: 600px) {
    html {
        overflow-x: hidden;
        position: relative;
    }
    .header-wrapper {
        padding: 0 8px;
        height: 56px;
        align-items: center;
        gap: 4px;
        min-width: 0;
    }
    .header-wrapper .top-icons {
        gap: 4px;
        min-width: 0;
        flex-wrap: nowrap;
    }
    .shuffle-teams-group {
        height: 28px;
        min-height: 28px;
        flex-shrink: 0;
    }
    .shuffle-teams-group .shuffle-teams-btn,
    .shuffle-teams-group .shuffle-spectators-toggle {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        font-size: 0.75em;
    }
    #volume-slider {
        width: 50px;
    }
    .volume-control i {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
    }
    .home-icon, .menu-icon, .rules-icon, .cancel-word-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }
    body {
        min-height: 100vh;
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 58px 0 28px;
        box-sizing: border-box;
        justify-content: flex-start;
        position: relative;
    }
    #header-container {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0 2px;
        gap: 8px;
        flex-direction: column;
    }
    #game-container {
        width: 100%;
        margin: 0;
        padding: 0;
        gap: 10px;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    #strike-container {
        width: 100%;
        margin: 0 !important;
        min-height: 14px;
        height: 14px;
    }
    #scores-container {
        width: 100%;
        min-width: 0;
        gap: 4px;
        padding: 0;
        margin: 0;
        display: flex;
    }
    .score-box {
        flex: 1;
        min-width: 0;
        padding: 4px 2px;
    }
    .score-box .jokers-container {
        gap: 2px;
        margin: 2px 0;
    }
    .score-box .joker-dot {
        width: 8px;
        height: 8px;
    }
    .score-box .joker-dot::before {
        width: 3px;
        height: 3px;
    }
    .team-label {
        font-size: 8px;
        margin-bottom: 0;
        letter-spacing: 0.2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    .score {
        font-size: 14px;
    }
    .console-header {
        padding: 5px 6px;
        font-size: 10px;
        flex-wrap: nowrap;
        gap: 4px;
        min-width: 0;
        justify-content: space-between;
    }
    .console-header > span {
        flex-shrink: 0;
        white-space: nowrap;
        padding-right: 4px;
    }
    .console-filters {
        flex: 1;
        min-width: 0;
        gap: 2px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        display: flex;
        justify-content: flex-end;
        margin-left: auto;
    }
    .console-filters::-webkit-scrollbar {
        display: none;
    }
    .console-filter-btn {
        padding: 2px 5px;
        font-size: 8px;
        flex-shrink: 0;
        white-space: nowrap;
        min-width: fit-content;
    }
    .game-console {
        height: 120px;
        padding: 6px;
    }
    .console-message {
        font-size: 10px;
        padding: 2px 3px;
        margin: 1px 0;
    }
    .console-summary-message {
        color: #00acc1;
        background-color: rgba(0, 172, 193, 0.15);
        padding: 8px;
        margin: 6px 0;
        border-radius: 4px;
        border-left: 3px solid #00acc1;
        font-weight: 500;
        font-size: 10px;
    }
    #gameplay {
        padding: 18px;
        margin-bottom: 15px;
    }
    #teams-container {
        max-height: none;
        overflow-y: visible;
        padding: 10px;
        gap: 8px;
    }
    .team {
        padding: 6px;
    }
    .team h4 {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .role-section {
        padding: 6px;
        margin: 3px 0;
    }
    .role-section h5 {
        font-size: 11px;
        margin-bottom: 3px;
    }
    li {
        padding: 3px 6px;
        font-size: 10px;
    }
    #timer {
        font-size: 20px;
        padding: 8px 12px;
        min-width: 90px;
    }
    #word-to-guess {
        font-size: 18px;
        padding: 12px;
        margin: 10px 0;
    }
    #pass-button, #validate-button, #reveal-word-button {
        font-size: 12px;
        padding: 8px 14px;
        margin: 4px;
    }
    .footer-admin {
        height: 50px;
        padding: 0 10px;
        gap: 8px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
        z-index: 1000;
        margin: 0;
    }
    .footer-admin label {
        font-size: 16px;
    }
    .footer-admin input {
        width: 60px;
        padding: 6px 8px;
        font-size: 13px;
        border-radius: 4px;
    }
    .footer-admin button:first-of-type {
        padding: 0 12px;
        height: 32px;
        font-size: 13px;
    }
    .footer-admin button:not(:first-of-type) {
        width: 32px;
        height: 32px;
    }
    .footer-admin button i {
        font-size: 14px;
    }
    .game-buttons {
        gap: 8px;
        margin-top: 0;
    }
    .home-icon {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 15px;
        margin-left: auto;
        margin-right: auto;
    }
    .modal {
        max-width: 305px;
    }
    .game-console {
        height: 120px;
    }
    #game-container {
        flex-direction: column;
    }
    .left-column {
        width: 100%;
        gap: 15px;
    }
    .top-icons {
        top: 5px;
    }
    .volume-control {
        top: 5px;
        left: 10px;
        height: 36px;
    }
    #volume-slider {
        width: 80px;
        left: 45px;
    }
}
@media screen and (min-width: 768px) {
    .modal {
        max-width: 400px;
    }
}
@media screen and (max-width: 767px) {
    .modal {
        max-width: 305px;
    }
}
.modal h2 {
    margin: 0 0 14px 0;
    color: #64b5f6;
    font-size: 19px;
    font-weight: 500;
}
.modal p {
    color: #b0cfe8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 22px;
}
.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}
.modal-button {
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}
.modal-button.confirm {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.modal-button.confirm:hover {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.modal-button.cancel {
    background: rgba(255,255,255,0.07);
    color: #90caf9;
    border: 1px solid rgba(139, 92, 246, 0.45);
}
.modal-button.cancel:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(33, 150, 243, 0.4);
}
.modal-button:active {
    transform: translateY(1px) !important;
}
.game-console-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
}
.console-header {
    background: rgba(7, 20, 38, 0.85);
    color: #64b5f6;
    padding: 8px 12px;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.38);
    border-bottom: none;
    box-sizing: border-box;
    width: 100%;
}
.console-header > span {
    display: flex;
    align-items: center;
}
.console-header > span::before {
    content: '>';
    margin-right: 8px;
    color: #2196f3;
}
.console-title-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 3px;
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-family: 'SF Mono', 'Roboto Mono', monospace;
}
.console-title-btn:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.5);
}
.console-title-btn.active {
    background: rgba(33, 150, 243, 0.4);
    border-color: #2196f3;
    color: #90caf9;
    font-weight: 500;
}
.console-filters {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
}
.console-filters::-webkit-scrollbar {
    display: none;
}
.console-filter-btn {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 4px 8px;
    font-size: 10px;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}
.console-filter-btn:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.5);
}
.console-filter-btn.active {
    background: rgba(33, 150, 243, 0.4);
    border-color: #2196f3;
    color: #90caf9;
    font-weight: 500;
}
.console-summary-message {
    color: #00acc1;
    background-color: rgba(0, 172, 193, 0.15);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #00acc1;
    font-weight: 500;
    font-weight: 500;
}
.game-console {
    background: rgba(4, 12, 24, 0.85);
    height: 150px;
    overflow-y: auto;
    margin-top: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(33, 150, 243, 0.4) transparent;
    border: 1px solid rgba(139, 92, 246, 0.38);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    text-align: left;
    padding: 8px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
}
#console-content {
    display: flex;
    flex-direction: column;
}
.console-message {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    margin: 3px 0;
    padding: 5px 8px 5px 10px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.025);
    border-left: 2px solid transparent;
    animation: msgFadeIn 0.2s ease;
}
/* Restauration console (full sync / filtre) : pas de refade au retour d’onglet ou changement d’app */
.console-message.console-batch-restore {
    animation: none;
}
@keyframes msgFadeIn {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}
.console-message strong {
    font-weight: 500;
}
.console-message.info {
    color: #ffb74d;
    background: rgba(255, 152, 0, 0.08);
    border-left-color: #ff9800;
}
.console-message.success {
    color: #81c784;
    background: rgba(76, 175, 80, 0.08);
    border-left-color: #4caf50;
}
.console-message.welcome {
    color: #64b5f6;
    background-color: rgba(33, 150, 243, 0.1);
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 3px solid #2196f3;
    line-height: 1.6;
}
.console-message.welcome strong {
    color: #2196f3;
    font-weight: 500;
}
.rules-link {
    color: #2196f3;
    background-color: rgba(33, 150, 243, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.rules-link:hover {
    color: #64b5f6;
    background-color: rgba(33, 150, 243, 0.3);
}
.console-message.nightmare-bomb {
    color: #ff5722;
    background-color: rgba(255, 87, 34, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #ff5722;
}
.console-message.nightmare-explosion {
    color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #ff9800;
}
.console-message.nightmare-defused {
    color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #4caf50;
}
.console-message.nightmare-ghost {
    color: #9c27b0;
    background-color: rgba(156, 39, 176, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #9c27b0;
}
.console-message.nightmare-swap {
    color: #e91e63;
    background-color: rgba(233, 30, 99, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #e91e63;
}
.console-message.nightmare-reverse {
    color: #673ab7;
    background-color: rgba(103, 58, 183, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #673ab7;
}
.console-message.nightmare-word-revealed {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}
.console-message.joker-gained {
    color: #ffd700;
    background-color: rgba(255, 215, 0, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #ffd700;
    font-weight: 500;
}
.console-message.joker-used {
    color: #ff6b35;
    background-color: rgba(255, 107, 53, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #ff6b35;
    font-weight: 500;
}
.console-message.joker-action {
    color: #00bcd4;
    background-color: rgba(0, 188, 212, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #00bcd4;
    font-weight: 500;
}
.console-message.joker-restore {
    color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #4caf50;
    font-weight: 500;
}
.console-message.round-change {
    color: #00acc1;
    background-color: rgba(0, 172, 193, 0.15);
    padding: 8px;
    margin: 6px 0;
    border-radius: 4px;
    border-left: 3px solid #00acc1;
    font-weight: 500;
}
.game-console::-webkit-scrollbar-thumb {
    background-color: #2196f3;
    border: 2px solid #102a43;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-spinner {
    display: none;
}
.loading .loading-spinner {
    display: none;
}
.header-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(7, 18, 32, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(33, 150, 243, 0.25);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}
.header-wrapper > * {
    margin: 0;
    padding: 0;
}
.volume-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    line-height: 1;
}
.volume-control i {
    background: rgba(33, 150, 243, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 4px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #90caf9;
    font-size: 1.1em;
}
.volume-control i:hover {
    background: rgba(33, 150, 243, 0.32);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: scale(1.05);
}
#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    min-height: 4px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: rgba(33, 150, 243, 0.3);
    outline: none;
    align-self: center;
}
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2196f3;
    cursor: pointer;
    transition: all 0.2s ease;
}
#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2196f3;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
#volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}
.top-icons {
    position: relative;
    display: flex;
    gap: 15px;
    align-items: center;
    height: 38px;
    line-height: 1;
}
.home-icon, .menu-icon, .rules-icon {
    background: rgba(33, 150, 243, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 4px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #90caf9;
    font-size: 1.1em;
}
.home-icon:hover, .menu-icon:hover, .rules-icon:hover {
    background: rgba(33, 150, 243, 0.32);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: scale(1.05);
}
@media screen and (max-width: 767px) {
    .header-wrapper {
        padding: 0 10px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
    }
    .header-wrapper .volume-control,
    .header-wrapper .top-icons {
        align-self: center;
    }
    .volume-control {
        gap: 6px;
        align-items: center;
        display: flex;
        flex-shrink: 0;
    }
    .volume-control i {
        height: 30px;
        width: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 0.9em;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    #volume-slider {
        width: 70px;
        height: 4px;
        min-height: 4px;
        margin: 0;
        flex-shrink: 0;
        padding: 0;
        -webkit-appearance: none;
        appearance: none;
    }
    .top-icons {
        gap: 6px;
        align-items: center;
        display: flex;
        flex-shrink: 0;
    }
    .home-icon, .menu-icon, .rules-icon, .cancel-word-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 0.95em;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .shuffle-teams-group {
        display: flex;
        align-items: center;
        height: 30px;
        min-height: 30px;
        flex-shrink: 0;
        border-radius: 4px;
        overflow: hidden;
        border: 1px solid rgba(33, 150, 243, 0.3);
        background: rgba(33, 150, 243, 0.18);
    }
    .shuffle-teams-group .shuffle-teams-btn,
    .shuffle-teams-group .shuffle-spectators-toggle {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 0.8em;
        padding: 0;
    }
}
.rules-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 20%, rgba(33, 150, 243, 0.18), rgba(6, 12, 26, 0.72) 60%);
    z-index: 1001;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}
.rules-content {
    background: linear-gradient(155deg, rgba(16, 42, 78, 0.96) 0%, rgba(18, 54, 98, 0.95) 45%, rgba(14, 36, 70, 0.97) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 26px;
    border-radius: 3px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(33, 150, 243, 0.18);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(100, 181, 246, 0.45);
    scrollbar-width: thin;
    scrollbar-color: rgba(33, 150, 243, 0.4) transparent;
}
.rules-content::-webkit-scrollbar {
    width: 8px;
}
.rules-content::-webkit-scrollbar-track {
    background: #102a43;
    border-radius: 4px;
}
.rules-content::-webkit-scrollbar-thumb {
    background: #2196f3;
    border-radius: 4px;
}
.rules-content::-webkit-scrollbar-thumb:hover {
    background: #1976d2;
}
.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.25);
    text-align: center;
}
.rules-header h2 {
    margin: 0;
    color: #90caf9;
    font-size: 20px;
    font-weight: 500;
}
.close-rules {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #64b5f6;
    padding: 5px;
    transition: all 0.3s ease;
}
.close-rules:hover {
    color: #2196f3;
}
.rules-body {
    color: #d6e8fb;
    text-align: left;
}
.rules-body h3 {
    color: #64b5f6;
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
}
.rules-body p {
    margin: 8px 0;
    line-height: 1.5;
    font-size: 14px;
    text-align: left;
}
.rules-body strong {
    color: #90caf9;
    display: block;
    margin-top: 12px;
    margin-bottom: 8px;
}
.rules-body ul {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}
.rules-body ul li {
    margin: 8px 0;
    position: relative;
    font-size: 14px;
    text-align: left;
}
.rules-body ul li:before {
    content: "•";
    color: #2196f3;
    position: absolute;
    left: -20px;
}
.rules-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(100, 181, 246, 0.25);
    font-style: italic;
    color: #64b5f6;
    font-size: 13px;
    text-align: center;
}
@media (max-width: 767px) {
    .rules-content {
        width: 85%;
        padding: 20px;
        max-width: 400px;
    }
    .rules-body h3 {
        font-size: 15px;
    }
    .rules-body p, .rules-body ul li {
        font-size: 13px;
    }
}
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s;
}
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(7, 18, 34, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-left: 1px solid rgba(139, 92, 246, 0.38);
    overflow-y: auto;
}
.side-menu.active {
    right: 0;
}
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}
.menu-header h3 {
    margin: 0;
    color: #e3f2fd;
}
.close-menu {
    background: none;
    border: none;
    color: #64b5f6;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}
.menu-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 30px;
}
.menu-content::-webkit-scrollbar {
    width: 8px;
}
.menu-content::-webkit-scrollbar-track {
    background: rgba(16, 42, 67, 0.5);
    border-radius: 4px;
}
.menu-content::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.3);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.menu-content::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.5);
    border: 2px solid transparent;
    background-clip: padding-box;
}
.menu-section {
    background: rgba(13, 30, 52, 0.7);
    border-radius: 4px;
    padding: 14px;
    position: relative;
    border: 1px solid rgba(33, 150, 243, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}
.menu-section:hover {
    border-color: rgba(33, 150, 243, 0.32);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.menu-section.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
.menu-section h4 {
    color: #64b5f6;
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 500;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(33, 150, 243, 0.18);
    text-align: center;
}
#spectators-title {
    margin-top: 20px;
}
.teams-management {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}
.teams-management h4 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.42);
}
.teams-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.team-control-btn {
    background: rgba(33, 150, 243, 0.2);
    color: #90caf9;
    border: 1px solid rgba(139, 92, 246, 0.38);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    width: 100%;
}
.team-control-btn:hover {
    background: rgba(33, 150, 243, 0.35);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: translateY(-1px);
}
.team-control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(7, 20, 38, 0.6);
    border-radius: 4px;
    color: #e3f2fd;
    font-size: 13px;
    border: 1px solid rgba(139, 92, 246, 0.35);
}
.team-remove-btn {
    background: none;
    border: none;
    color: #ff4081;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.team-remove-btn:hover {
    color: #f50057;
}
@media screen and (max-width: 767px) {
    .side-menu {
        width: 250px;
        padding: 15px;
    }
    .menu-content {
        gap: 15px;
    }
    .menu-section {
        padding: 12px;
    }
    .menu-section h4 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    .team-control-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    .team-control-item {
        padding: 6px 10px;
        font-size: 12px;
    }
}
button:disabled {
    background-color: #64b5f6 !important;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.team-players {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 2px;
    overflow-x: auto;
}
.disconnected {
    opacity: 0.5;
    color: #999;
    font-style: italic;
    padding-right: 20px;
}
.player-item.disconnected {
    position: relative;
}
.player-item.disconnected::after {
    content: "⚫";
    position: absolute;
    right: 2px;
    color: #ff4444;
    font-size: 0.8em;
    top: 0px;
}
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #0b1d3a 0%, #112d58 30%, #1c4278 58%, #0d2040 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.custom-popup {
    background: rgba(14, 30, 62, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 26px;
    border-radius: 4px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(33, 150, 243, 0.3);
    animation: fadeInScale 0.25s ease;
    position: relative;
    overflow: hidden;
}
.custom-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2196f3, transparent);
    opacity: 0.7;
}
.custom-popup h3 {
    margin: 0 0 15px 0;
    color: #2196f3;
    font-size: 20px;
    font-weight: 500;
}
.custom-popup p {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
}
.custom-popup-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}
.custom-popup-button {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.4px;
}
.custom-popup-button:hover {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.custom-popup-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.custom-popup-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}
.custom-popup-button:focus::after {
    animation: ripple 1s ease-out;
}
.custom-popup-button.cancel {
    background-color: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}
.custom-popup-button.cancel:hover {
    background-color: #e9ecef;
    color: #495057;
}
.custom-popup-button.confirm {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}
.custom-popup-button.confirm:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}
@media (max-width: 768px) {
    .custom-popup {
        width: 85%;
        padding: 20px;
        max-width: 305px;
    }
    .custom-popup h3 {
        font-size: 18px;
    }
    .custom-popup p {
        font-size: 13px;
    }
    .custom-popup-button {
        padding: 8px 20px;
        font-size: 13px;
    }
}
.team-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}
.team-header h4 {
    margin: 0;
    color: #2196f3;
    font-size: 14px;
}
.team-header .team-remove-btn {
    background: none;
    border: none;
    color: #ff4081;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-size: 12px;
}
.team-header .team-remove-btn:hover {
    color: #f50057;
    background: rgba(255, 64, 129, 0.1);
}
@media screen and (max-width: 767px) {
    .cancel-word-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 0.9em;
    }
}
.shuffle-teams-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}
.shuffle-teams-section h4 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.42);
}
.shuffle-teams-section .team-control-btn {
    width: 100%;
}
.shuffle-teams-section h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 1.1em;
    font-weight: 500;
}
.shuffle-teams-section .menu-button {
    width: 100%;
    padding: 10px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}
.shuffle-teams-section .menu-button:hover {
    background: #1976d2;
}
.shuffle-teams-section .menu-button i {
    margin-right: 8px;
}
.custom-grid-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}
.custom-grid-section h4 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.42);
}
.custom-grid-btn {
    background: rgba(33, 150, 243, 0.2);
    color: #90caf9;
    border: 1px solid rgba(139, 92, 246, 0.38);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    width: 100%;
}
.custom-grid-btn:hover {
    background: rgba(33, 150, 243, 0.35);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: translateY(-1px);
}
.custom-grid-btn:active {
    transform: translateY(1px);
}
.custom-grid-btn i {
    font-size: 14px;
}
.custom-grid-modal {
    max-width: 600px;
    width: 90%;
    background: rgba(8, 20, 38, 0.97);
    border-radius: 3px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.40);
}
.custom-grid-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 15px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}
.custom-grid-modal .modal-header h2 {
    margin: 0;
    color: #2196f3;
    font-size: 20px;
    font-weight: 500;
}
.custom-grid-modal textarea {
    width: 90%;
    padding: 14px;
    margin: 14px 0;
    background: rgba(7, 20, 38, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 4px;
    color: #e3f2fd;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 200px;
    font-family: 'Quicksand', inherit;
    transition: all 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(33, 150, 243, 0.4) transparent;
}
.custom-grid-modal textarea::-webkit-scrollbar {
    width: 8px;
}
.custom-grid-modal textarea::-webkit-scrollbar-track {
    background: #102a43;
    border-radius: 4px;
}
.custom-grid-modal textarea::-webkit-scrollbar-thumb {
    background-color: #2196f3;
    border-radius: 4px;
    border: 2px solid #102a43;
}
.custom-grid-modal textarea::-webkit-scrollbar-thumb:hover {
    background-color: #1976d2;
}
.custom-grid-modal .close-modal {
    background: none;
    border: none;
    color: #b3e5fc;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.custom-grid-modal .close-modal:hover {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    transform: rotate(90deg);
}
.custom-grid-modal .close-modal:active {
    transform: rotate(90deg) scale(0.95);
}
.custom-grid-modal .modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}
.custom-grid-modal .modal-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}
.custom-grid-modal .modal-button.confirm {
    background-color: #2196f3;
    color: #ffffff;
}
.custom-grid-modal .modal-button.confirm:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
}
.custom-grid-modal .modal-button.cancel {
    background-color: #102a43;
    color: #b3e5fc;
    border: 1px solid rgba(139, 92, 246, 0.42);
}
.custom-grid-modal .modal-button.cancel:hover {
    background-color: #0d2137;
}
.custom-grid-modal .modal-button.reset {
    background-color: #ff4081;
    color: #ffffff;
}
.custom-grid-modal .modal-button.reset:hover {
    background-color: #f50057;
    transform: translateY(-1px);
}
.custom-grid-modal .modal-button:active {
    transform: translateY(1px);
}
@media screen and (max-width: 767px) {
    .custom-grid-modal {
        width: 80%;
        max-width: 400px;
    }
    .custom-grid-modal .modal-header {
        padding: 15px;
    }
    .custom-grid-modal .modal-content {
        padding: 15px;
    }
    .custom-grid-modal textarea {
        padding: 12px;
        font-size: 13px;
    }
    .custom-grid-modal .modal-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    .custom-grid-modal .modal-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}
.shuffle-teams-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}
.shuffle-teams-section h4 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.42);
}
.shuffle-teams-section .team-control-btn {
    width: 100%;
}
.shuffle-teams-section h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 1.1em;
    font-weight: 500;
}
.shuffle-teams-section .menu-button {
    width: 100%;
    padding: 10px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}
.shuffle-teams-section .menu-button:hover {
    background: #1976d2;
}
.shuffle-teams-section .menu-button i {
    margin-right: 8px;
}
.hidden {
    display: none !important;
}
@keyframes activeBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(33, 150, 243, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);
    }
}
#start-game-button {
    background: rgba(36, 111, 17, 0.3);
    color: #a5d6a7;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    padding: 8px 16px;
    border: 1px solid rgba(76, 175, 80, 0.45);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 100px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.12);
    letter-spacing: 0.4px;
}
#start-game-button:hover {
    background: rgba(36, 111, 17, 0.48);
    border-color: rgba(76, 175, 80, 0.7);
    color: #c8e6c9;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}
#start-game-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.change-username-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}
.change-username-section input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 4px;
    background: rgba(7, 20, 38, 0.6);
    color: #e3f2fd;
    font-size: 13px;
    font-family: 'Quicksand', sans-serif;
    min-width: 0;
    transition: all 0.2s ease;
}
.change-username-section input:focus {
    outline: none;
    border-color: rgba(33, 150, 243, 0.6);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}
.change-username-section input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.change-username-btn {
    background: none;
    border: none;
    color: #2196f3;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.change-username-btn:hover {
    color: #64b5f6;
    transform: scale(1.1);
}
.change-username-btn:active {
    transform: scale(0.95);
}
@media screen and (max-width: 767px) {
    .change-username-section {
        padding-right: 0;
    }
    .change-username-section input {
        font-size: 13px;
        padding: 6px 8px;
    }
    .change-username-btn {
        padding: 6px;
    }
}
.menu-section:last-child {
    margin-bottom: 30px;
}
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a1929;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.teams-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.shuffle-teams-group {
    display: flex;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(33, 150, 243, 0.3);
    background: rgba(33, 150, 243, 0.18);
}
.shuffle-teams-group .shuffle-teams-btn {
    border: none;
    border-radius: 0;
    border-right: 1px solid rgba(33, 150, 243, 0.25);
}
.shuffle-teams-group .shuffle-spectators-toggle {
    border: none;
    border-radius: 0;
}
.shuffle-spectators-toggle {
    background: transparent;
    width: 32px;
    height: 38px;
    min-width: 32px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #64b5f6;
    font-size: 0.95em;
    padding: 0;
}
.shuffle-spectators-toggle:hover {
    background: rgba(33, 150, 243, 0.15);
    color: #90caf9;
}
.shuffle-spectators-toggle.active {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}
.shuffle-spectators-toggle.active:hover {
    background: rgba(76, 175, 80, 0.3);
    color: #a5d6a7;
}
.shuffle-teams-group .shuffle-teams-btn:hover {
    background: rgba(33, 150, 243, 0.28);
}
.shuffle-teams-group:hover {
    border-color: rgba(33, 150, 243, 0.5);
}
.shuffle-teams-btn {
    background: transparent;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #90caf9;
    font-size: 1.1em;
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 4px;
}
.shuffle-teams-btn:hover {
    background: rgba(33, 150, 243, 0.32);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: scale(1.05);
}
.shuffle-teams-group .shuffle-teams-btn:hover {
    transform: none;
}
.shuffle-teams-btn:active {
    transform: scale(0.95);
}
.cancel-word-btn {
    background: rgba(229, 57, 53, 0.18);
    border: 1px solid rgba(229, 57, 53, 0.4);
    border-radius: 4px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #ef9a9a;
    font-size: 1.1em;
}
.cancel-word-btn:hover {
    background: rgba(229, 57, 53, 0.32);
    border-color: rgba(229, 57, 53, 0.7);
    color: #ffcdd2;
    transform: scale(1.05);
}
.cancel-word-btn:active {
    transform: scale(0.95);
}
.cancel-word-btn:disabled {
    background: rgba(100, 100, 100, 0.5) !important;
    cursor: not-allowed !important;
    transform: none !important;
}
.game-mode-modal {
    max-width: 1000px !important;
    width: 90% !important;
    margin: 0 !important;
}
@media screen and (max-width: 767px) {
    .shuffle-teams-group {
        height: 30px;
        min-height: 30px;
    }
    .shuffle-teams-group .shuffle-spectators-toggle {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 0.8em;
    }
    .shuffle-teams-group .shuffle-teams-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 0.8em;
    }
    .game-mode-modal {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 10px !important;
        padding: 15px !important;
    }
}
@media screen and (max-width: 400px) {
    .shuffle-teams-group {
        height: 26px;
        min-height: 26px;
    }
    .shuffle-teams-group .shuffle-teams-btn,
    .shuffle-teams-group .shuffle-spectators-toggle {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        font-size: 0.7em;
    }
    .game-mode-modal {
        width: calc(100% - 10px) !important;
        max-width: calc(100% - 10px) !important;
        margin: 5px !important;
        padding: 12px !important;
    }
    .game-mode-modal .modal-header {
        padding: 15px 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
    .game-mode-modal .modal-header h2 {
        font-size: 18px !important;
        width: 100% !important;
        text-align: center !important;
    }
    .game-mode-modal .modal-content {
        padding: 15px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .game-mode-options {
        gap: 12px !important;
        padding: 10px 0 !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }
    .game-mode-option {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    .game-mode-option h3 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    .game-mode-option p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
}
.game-mode-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    padding: 20px 0;
    width: 100%;
    box-sizing: border-box;
}
.game-mode-option {
    background: rgba(13, 30, 52, 0.65);
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 3px;
    padding: 20px;
    width: 45%;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.game-mode-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2196f3, transparent);
    opacity: 0.7;
}
.player-count {
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 11px;
    color: rgba(179, 229, 252, 0.85);
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 4px;
    padding: 2px 7px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.player-count i {
    margin-right: 3px;
    font-size: 10px;
}
.game-mode-option:hover {
    background: rgba(33, 150, 243, 0.14);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border-color: rgba(33, 150, 243, 0.45);
}
.game-mode-option:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.game-mode-option h3 {
    color: #2196f3;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.game-mode-option p {
    color: #b3e5fc;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    opacity: 0.9;
}
@media screen and (max-width: 767px) {
    .game-mode-modal .modal-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .game-mode-options {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    .game-mode-option {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 0 auto;
        box-sizing: border-box;
    }
    .game-mode-option h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .game-mode-option p {
        font-size: 13px;
        line-height: 1.5;
    }
}
#gameplay {
    background: rgba(10, 22, 40, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
    border-radius: 3px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.38);
    position: relative;
    overflow: hidden;
    padding: 20px 15px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 210px;
    box-sizing: border-box;
}
#gameplay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2196f3, transparent);
    opacity: 0.7;
}
#word-to-guess {
    font-size: 18px;
    font-weight: 500;
    background: rgba(7, 26, 50, 0.7);
    padding: 14px 22px;
    border-radius: 4px;
    margin: 8px 0;
    color: #e3f2fd;
    letter-spacing: 0.5px;
    border: 1px solid rgba(76, 175, 80, 0.5);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}
#word-to-guess.difficulty-facile {
    border-color: rgba(76, 175, 80, 0.6);
}
#word-to-guess.difficulty-moyen {
    border-color: rgba(255, 152, 0, 0.6);
}
#word-to-guess.difficulty-difficile {
    border-color: rgba(244, 67, 54, 0.6);
}
#word-to-guess.difficulty-ajouté {
    border-color: rgba(156, 39, 176, 0.5);
}
.difficulty-badge {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 3px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    top: -2px;
    min-width: 60px;
    text-align: center;
}
.difficulty-facile {
    background-color: #4caf50;
    color: white;
}
.difficulty-moyen {
    background-color: #ff9800;
    color: white;
}
.difficulty-difficile {
    background-color: #f44336;
    color: white;
}
.difficulty-ajouté {
    background-color: #9c27b0;
    color: white;
}
#word-to-guess::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.5), transparent);
}
#timer {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 26px;
    font-weight: 500;
    color: #90caf9;
    background: rgba(7, 26, 50, 0.82);
    padding: 10px 18px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 2px;
    min-width: 120px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin: 10px 0px;
    border: 1px solid rgba(139, 92, 246, 0.45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    --progress: 100%;
}
#strike-container {
    min-height: 18px;
    height: 18px;
    background-color: rgba(7, 20, 38, 0.4);
    border-radius: 4px;
    margin: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) inset;
    width: 100%;
}
#strike-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #1565c0, #2196f3, #64b5f6);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), background 0.5s ease;
    position: relative;
    will-change: width, background;
}
#strike-bar.no-transition {
    transition: none !important;
}
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 3px 1px rgba(33, 150, 243, 0.6);
        background: linear-gradient(to right, #2196f3, #64b5f6);
    }
    100% {
        box-shadow: 0 0 8px 2px rgba(33, 150, 243, 0.8);
        background: linear-gradient(to right, #64b5f6, #90caf9);
    }
}
#strike-bar.max-reached {
    animation: pulseGlow 0.7s infinite alternate;
    box-shadow: 0 0 5px 1px rgba(33, 150, 243, 0.7);
}
#strike-text {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    z-index: 2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.7;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Media queries pour tablettes et zooms */
@media screen and (min-width: 768px) and (max-width: 1400px) {
    #strike-container {
        min-height: 18px;
        height: 18px;
    }
    #strike-text {
        font-size: 13px;
        right: 8px;
    }
}
/* Pour les tablettes en mode portrait (comme Redmi Pad 2) */
@media screen and (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
    #strike-container {
        min-height: 20px;
        height: 20px;
    }
    #strike-text {
        font-size: 13px;
        right: 8px;
    }
}
/* Pour les tablettes en mode paysage */
@media screen and (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    #strike-container {
        min-height: 20px;
        height: 20px;
    }
    #strike-text {
        font-size: 14px;
        right: 10px;
    }
}
/* Pour les très petits écrans avec zoom */
@media screen and (max-width: 480px) {
    #strike-container {
        min-height: 18px;
        height: 18px;
    }
    #strike-text {
        font-size: 11px;
        right: 6px;
    }
}
@keyframes strikeAnimation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 15px 0;
    }
}
#timer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2196f3, transparent);
    opacity: 0.7;
}
#timer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: var(--progress);
    height: 4px;
    background: #2196f3;
    transition: width 1s linear;
}
#timer.warning {
    color: #ff4081;
    animation: pulse 1.2s infinite;
    border-color: rgba(255, 64, 129, 0.3);
    box-shadow: 0 4px 12px rgba(255, 64, 129, 0.2);
}
#timer.warning::before {
    background: linear-gradient(90deg, transparent, #ff4081, transparent);
}
#timer.warning::after {
    background: #ff4081;
}
#timer.paused {
    color: #64b5f6;
    animation: blink 1.2s infinite;
    border-color: rgba(100, 181, 246, 0.3);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.2);
}
#timer.paused::before {
    background: linear-gradient(90deg, transparent, #64b5f6, transparent);
}
#timer.paused::after {
    background: #64b5f6;
    animation: none;
}
.game-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
}
#pass-button, #validate-button {
    background: rgba(33, 150, 243, 0.28);
    color: #b3d9ff;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    padding: 9px 22px;
    border: 1px solid rgba(33, 150, 243, 0.4);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 100px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.4px;
}
#pass-button:hover, #validate-button:hover {
    background: rgba(33, 150, 243, 0.38);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
#validate-button {
    background: rgba(36, 111, 17, 0.38);
    color: #b8f0b8;
    border-color: rgba(76, 175, 80, 0.58);
    box-shadow: none;
}
#validate-button:hover {
    background: rgba(36, 111, 17, 0.45);
    border-color: rgba(76, 175, 80, 0.7);
    color: #c8e6c9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
#reveal-word-button {
    background: rgba(139, 0, 139, 0.32);
    color: #dda8e8;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    padding: 9px 22px;
    border: 1px solid rgba(156, 39, 176, 0.5);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 100px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.4px;
}
#reveal-word-button:hover {
    background: rgba(139, 0, 139, 0.42);
    border-color: rgba(156, 39, 176, 0.7);
    color: #e1bee7;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
#pass-button:active, #validate-button:active, #reveal-word-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#pass-button::after, #validate-button::after, #reveal-word-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}
#pass-button:focus::after, #validate-button:focus::after, #reveal-word-button:focus::after {
    animation: ripple 1s ease-out;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.01); opacity: 0.95; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}
#teams-container {
    flex: 1;
    min-width: 270px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(10, 22, 40, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 3px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.38);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}
#teams-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2196f3, transparent);
    opacity: 0.7;
}
#teams-container::-webkit-scrollbar {
    width: 8px;
}
#teams-container::-webkit-scrollbar-track {
    background: rgba(16, 42, 67, 0.5);
    border-radius: 4px;
}
#teams-container::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.3);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
#teams-container::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.5);
    border: 2px solid transparent;
    background-clip: padding-box;
}
.team {
    background: rgba(10, 26, 50, 0.78);
    padding: 14px;
    border-radius: 4px;
    border: 1px solid rgba(33, 150, 243, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
}
.team:hover {
    border-color: rgba(33, 150, 243, 0.48);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}
.team h4 {
    color: #90caf9;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(33, 150, 243, 0.2);
}
.role-section {
    background: rgba(7, 20, 38, 0.7);
    margin: 6px 0;
    padding: 9px 12px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(33, 150, 243, 0.22);
    transition: all 0.2s ease;
    position: relative;
}
.role-section ul.team-players {
    min-height: 24px;
    /* La liste ne capture pas le clic : zone vide = clic pour rejoindre le rôle (parent). Les joueurs réactivent le pointeur. */
    pointer-events: none;
}
.role-section ul.team-players li.player-item {
    pointer-events: auto;
}
.role-section:hover {
    background: rgba(33, 150, 243, 0.08);
    border-color: rgba(33, 150, 243, 0.28);
}
.role-section.locked {
    cursor: not-allowed !important;
}
.role-section h5 {
    color: #7ec8f5;
    font-size: 10px;
    margin: 0 0 5px 0;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.85;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}
li {
    padding: 4px 8px;
    margin: 0;
    background: rgba(7, 20, 38, 0.6);
    border-radius: 6px;
    font-size: 11px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    flex: 0 1 auto;
    transition: all 0.2s ease;
}
li:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
    transform: translateY(-1px);
}
.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.player-item .player-name {
    flex-grow: 1;
    color: #b3e5fc;
    font-weight: 500;
}
.player-item .kick-button {
    display: none;
    color: #ff4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 8px;
}
.player-item .kick-button:hover {
    background: rgba(255, 68, 68, 0.1);
}
.player-item .kick-button i {
    font-size: 14px;
}
.player-item .kick-button {
    display: inline-block;
}
.player-item .self-kick-button {
    color: #666;
    cursor: default;
}
.player-item .self-kick-button:hover {
    background: none;
}
#players-list {
    flex-direction: column;
    justify-content: flex-start;
}
#players-list li {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    justify-content: space-between;
}
#players-list .player-item.disconnected {
    opacity: 0.6;
    background: rgba(13, 33, 55, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    position: relative;
}
#players-list .player-item.disconnected .player-name {
    text-decoration: line-through;
    text-decoration-color: rgba(255, 87, 87, 0.5);
    text-decoration-thickness: 1px;
}
.spectator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    margin-bottom: 4px;
    background: rgba(7, 20, 38, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 11px;
}
.spectator-item:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
    transform: translateY(-1px);
}
.spectator-item.disconnected {
    opacity: 0.6;
    background: rgba(13, 33, 55, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    position: relative;
}
.spectator-item > .fa-eye {
    margin-left: 3px;
    margin-right: 8px;
    font-size: 14px;
}
.player-item .admin-crown,
.spectator-item .admin-crown {
    font-size: 12px !important;
}
.spectator-name {
    flex-grow: 1;
    color: #b3e5fc;
    font-weight: 500;
    text-align: center;
}
.spectator-item .kick-button {
    display: none;
    color: #ff4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 5px;
}
.spectator-item .kick-button:hover {
    background: rgba(255, 68, 68, 0.1);
}
.spectator-item .kick-button i {
    font-size: 14px;
}
.spectator-item .spectator-button {
    font-size: 11px;
}
.spectator-item .admin-crown {
    font-size: 14px!important;
}
.spectator-item .kick-button {
    display: inline-block;
}
.spectator-item .self-kick-button {
    color: #666;
    cursor: default;
}
.spectator-item .self-kick-button:hover {
    background: none;
}
.spectator-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}
.spectator-button {
    color: #64b5f6;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}
.spectator-button:hover {
    background: rgba(100, 181, 246, 0.1);
    color: #90caf9;
}
#spectators-list {
    overflow-y: auto;
    margin-bottom: 15px;
}
#spectators-list:empty {
    display: none;
}
#spectators-list + h4 {
    margin-top: 20px;
}
.become-spectator-btn {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(33, 150, 243, 0.2);
    color: #90caf9;
    border: 1px solid rgba(139, 92, 246, 0.38);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.become-spectator-btn:hover {
    background: rgba(33, 150, 243, 0.35);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: translateY(-1px);
}
.become-spectator-btn:active {
    transform: translateY(0);
}
.become-spectator-btn i {
    font-size: 14px;
}
#header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    padding-top: 10px;
    padding-bottom: 10px;
    z-index: 1;
}
h2#current-turn {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #b3d9ff;
    letter-spacing: 0.3px;
}
#role-message {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.3px;
    font-style: italic;
    min-height: 1em;
}
#scores-container {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}
.score-box {
    background: rgba(10, 26, 50, 0.78);
    padding: 12px 18px;
    border-radius: 4px;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(33, 150, 243, 0.2);
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
}
@media screen and (max-width: 600px) {
    #scores-container .score-box {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none;
        padding: 4px 2px !important;
    }
}
.score-box.active {
    border-color: rgba(33, 150, 243, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    background: rgba(15, 38, 72, 0.88);
}
.game-started .score-box.active {
    animation: borderGlow 2s infinite;
}
.game-over .score-box.active {
    animation: none !important;
    border-color: rgba(33, 150, 243, 0.3) !important;
    box-shadow: none !important;
}
.game-over .score-box.active::before {
    display: none !important;
}
@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(33, 150, 243, 0.6);
    }
    50% {
        border-color: rgba(100, 181, 246, 0.8);
    }
}
.game-started .score-box.active::before {
    display: none;
}
@keyframes borderRotate {
    0% {
        background: linear-gradient(0deg, #2196f3, #64b5f6, #2196f3) border-box;
    }
    100% {
        background: linear-gradient(360deg, #2196f3, #64b5f6, #2196f3) border-box;
    }
}
.team-label {
    color: #90caf9;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 5px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.85;
}
.score {
    color: #ffffff;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 1px;
}
.footer-admin {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100%;
    background: rgba(7, 18, 32, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 0px;
    border-top: 1px solid rgba(139, 92, 246, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-height: 35px;
    box-sizing: border-box;
    z-index: 1000;
    margin: 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
.footer-admin label {
    color: #2196f3;
    font-size: 20px;
}
.footer-admin input {
    background: rgba(16, 42, 67, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: #e3f2fd;
    padding: 8px 12px;
    width: 80px;
    text-align: center;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.25s ease;
    font-family: 'Quicksand', sans-serif;
}
.footer-admin input:focus {
    border-color: #2196f3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}
.footer-admin button {
    background: rgba(33, 150, 243, 0.28);
    color: #cce8ff;
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
}
.footer-admin button:first-of-type {
    width: auto;
    padding: 0 20px;
    height: 36px;
    background: rgba(33, 150, 243, 0.45);
    border-color: rgba(33, 150, 243, 0.7);
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.footer-admin button:not(:first-of-type) {
    width: 36px;
    height: 36px;
}
.footer-admin button i {
    font-size: 14px;
    line-height: 1;
    display: inline-block;
}
.footer-admin button:hover {
    background: rgba(33, 150, 243, 0.38);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.footer-admin button:active {
    transform: translateY(1px);
}
.home-icon {
    position: static;
    margin: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 150, 243, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 4px;
    transition: all 0.25s ease;
    color: #90caf9;
    text-decoration: none;
    font-size: 1.1em;
}
.home-icon:hover {
    background: rgba(33, 150, 243, 0.32);
    border-color: rgba(33, 150, 243, 0.6);
    color: #e3f2fd;
    transform: scale(1.05);
}
.home-icon:active {
    transform: scale(0.96);
}
.admin-crown {
    margin-left: auto;
    opacity: 0.3;
    color: #2196f3;
    transition: all 0.3s ease;
    font-size: 12px;
}
.admin-crown.active {
    opacity: 1;
    color: #64b5f6;
}
.crown-clickable {
    cursor: pointer;
}
.crown-clickable:hover {
    transform: scale(1.2);
    opacity: 0.8;
}
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #0b1d3a 0%, #112d58 30%, #1c4278 58%, #0d2040 100%);
    z-index: 1000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.modal-overlay.active,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"] {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalOverlayFadeIn 0.25s ease;
}
@keyframes modalOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal {
    background: rgba(8, 20, 38, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 26px;
    border-radius: 3px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    width: 90%;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.40);
    margin: 0;
    position: relative;
    overflow: hidden;
}
.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2196f3, transparent);
    opacity: 0.7;
}

/* ── Joker modal : carte vivante, nouvelle DA ── */
.joker-modal-card {
    background: linear-gradient(145deg, rgba(14, 30, 62, 0.95) 0%, rgba(20, 45, 90, 0.92) 50%, rgba(12, 28, 55, 0.96) 100%) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(167, 139, 250, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(100, 180, 255, 0.07);
    border-radius: 8px;
}
.joker-modal-card::before {
    background: linear-gradient(90deg, transparent, rgba(80, 190, 255, 0.7), transparent);
    opacity: 0.9;
    height: 2px;
}
.joker-modal-card h2 {
    color: #64b5f6 !important;
}
.joker-modal-card p {
    color: #b3e5fc !important;
}
.joker-modal-card .joker-options {
    gap: 12px;
    margin: 18px 0;
}
.joker-modal-card .joker-option {
    background: linear-gradient(135deg, rgba(14, 35, 70, 0.9) 0%, rgba(20, 50, 95, 0.85) 100%);
    border: 1px solid rgba(33, 150, 243, 0.35);
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(100, 180, 255, 0.06);
    padding: 16px 18px;
    transition: all 0.3s ease;
}
.joker-modal-card .joker-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.2), inset 0 1px 0 rgba(100, 180, 255, 0.1);
    border-color: rgba(33, 150, 243, 0.55);
}
.joker-modal-card .joker-option[onclick*="event"] {
    border-color: rgba(239, 83, 80, 0.45);
}
.joker-modal-card .joker-option[onclick*="event"]:hover {
    box-shadow: 0 8px 24px rgba(239, 83, 80, 0.25);
    border-color: rgba(239, 83, 80, 0.65);
}
.joker-modal-card .joker-option[onclick*="event"] h3 {
    color: #ef5350;
}
.joker-modal-card .joker-option[onclick*="steal"] {
    border-color: rgba(255, 167, 38, 0.5);
}
.joker-modal-card .joker-option[onclick*="steal"]:hover {
    box-shadow: 0 8px 24px rgba(255, 167, 38, 0.25);
    border-color: rgba(255, 167, 38, 0.7);
}
.joker-modal-card .joker-option[onclick*="steal"] h3 {
    color: #ffa726;
}
.joker-modal-card .joker-option[onclick*="combo"] {
    border-color: rgba(171, 71, 188, 0.5);
}
.joker-modal-card .joker-option[onclick*="combo"]:hover {
    box-shadow: 0 8px 24px rgba(171, 71, 188, 0.25);
    border-color: rgba(171, 71, 188, 0.7);
}
.joker-modal-card .joker-option[onclick*="combo"] h3 {
    color: #ab47bc;
}
.joker-modal-card .joker-option .joker-icon {
    font-size: 28px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.joker-modal-card .joker-option h3 {
    font-size: 16px;
    font-weight: 600;
}
.joker-modal-card .joker-option p {
    font-size: 13px;
    color: #90caf9 !important;
    opacity: 0.95;
}
.joker-modal-card .modal-button.cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(167, 139, 250, 0.4);
    color: #90caf9;
}
.joker-modal-card .modal-button.cancel:hover {
    background: rgba(33, 150, 243, 0.12);
    border-color: rgba(33, 150, 243, 0.5);
    color: #b3e5fc;
}

.account-modal {
    border-radius: 12px !important;
    padding: 0 !important;
    max-width: 450px !important;
    width: 90% !important;
    text-align: left !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}
.account-modal .modal-content {
    padding: 20px !important;
}
.account-modal .modal-header {
    padding: 20px !important;
    border-bottom: 1px solid #2a2a3e !important;
}
.account-modal .modal-header h2 {
    color: #e3f2fd !important;
    font-size: 24px !important;
}
.account-modal .close-modal {
    color: #90caf9 !important;
}
.account-modal .close-modal:hover {
    color: #ffffff !important;
}
.account-modal #profile-content {
    color: #e3f2fd !important;
}
.account-modal .profile-info h3 {
    color: #2196f3 !important;
    display: flex;
    justify-content: space-around;
    font-weight: bolder;
    font-size: 17px;
}
.account-modal .profile-stat {
    border-bottom: 1px solid #2a2a3e !important;
}
.account-modal .games-history h4 {
    color: #2196f3 !important;
}
.account-modal .game-history-item {
    background: rgba(16, 42, 67, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.42) !important;
    position: relative;
}
.account-modal .game-history-item .game-date {
    color: #90caf9 !important;
}
.account-modal .game-history-item.cancelled {
    opacity: 0.7;
    border-color: rgba(255, 152, 0, 0.3) !important;
    background: rgba(16, 42, 67, 0.5) !important;
}
.account-modal .game-history-item.cancelled:hover {
    background: rgba(255, 152, 0, 0.1) !important;
    border-color: rgba(255, 152, 0, 0.4) !important;
}
.account-modal .game-cancelled-banner {
    position: absolute;
    top: 4px;
    right: 8px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}
.change-username-section input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05) !important;
}
.change-username-section:has(input:disabled) {
    opacity: 0.6;
}
.change-username-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
@media screen and (max-width: 767px) {
    .teams-container {
        max-height: none;
        overflow-y: visible;
        padding: 10px;
        gap: 8px;
    }
    .team {
        padding: 6px;
    }
    .team h4 {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .role-section {
        padding: 6px;
        margin: 3px 0;
    }
    .role-section h5 {
        font-size: 11px;
        margin-bottom: 3px;
    }
    li {
        padding: 3px 6px;
        font-size: 10px;
    }
    #timer {
        font-size: 20px;
        padding: 8px 12px;
        min-width: 90px;
    }
    #word-to-guess {
        font-size: 18px;
        padding: 12px;
        margin: 10px 0;
    }
    #pass-button, #validate-button, #reveal-word-button {
        font-size: 12px;
        padding: 8px 14px;
        margin: 4px;
    }
    .footer-admin {
        height: 50px;
        padding: 0 10px;
        gap: 8px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
        z-index: 1000;
        margin: 0;
    }
    .footer-admin label {
        font-size: 16px;
    }
    .footer-admin input {
        width: 60px;
        padding: 6px 8px;
        font-size: 13px;
    }
    .footer-admin button:first-of-type {
        padding: 0 12px;
        height: 32px;
        font-size: 13px;
    }
    .footer-admin button:not(:first-of-type) {
        width: 32px;
        height: 32px;
    }
    .footer-admin button i {
        font-size: 14px;
    }
    .game-buttons {
        gap: 8px;
        margin-top: 0;
    }
    .home-icon {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 15px;
        margin-left: auto;
        margin-right: auto;
    }
    .modal {
        max-width: 305px;
        margin: 20px !important;
    }
    .game-mode-modal {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 10px !important;
        padding: 15px !important;
    }
    .game-console {
        height: 176px;
    }
    #game-container {
        flex-direction: column;
    }
    .left-column {
        width: 100%;
        gap: 15px;
    }
    .top-icons {
        top: 5px;
    }
    .volume-control {
        top: 5px;
        left: 10px;
        height: 36px;
    }
    #volume-slider {
        width: 80px;
        left: 45px;
    }
}
#game-container, #header-container, .header-wrapper, #admin-controls, #strike-container, #duo-life-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#game-container.visible, 
#header-container.visible, 
.header-wrapper.visible, 
#admin-controls.visible,
#strike-container.visible,
#duo-life-container.visible {
    opacity: 1;
    pointer-events: auto;
}
/* ── Barre de vie DUO (design dédié, distinct du combo) ── */
.duo-life-bar-wrapper {
    width: 100%;
    min-height: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}
.duo-life-track {
    flex: 1;
    height: 16px;
    background: rgba(7, 20, 38, 0.6);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(33, 150, 243, 0.25);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.duo-life-fill {
    height: 100%;
    width: 100%;
    min-width: 0;
    border-radius: 7px;
    transition: width 0.35s ease, background 0.25s ease;
}
.duo-life-fill.duo-life-high {
    background: linear-gradient(90deg, #5e35b1 0%, #7e57c2 45%, #42a5f5 100%);
    box-shadow: 0 0 12px rgba(126, 87, 194, 0.35);
}
.duo-life-fill.duo-life-mid {
    background: linear-gradient(90deg, #3949ab 0%, #5c6bc0 45%, #26c6da 100%);
    box-shadow: 0 0 12px rgba(92, 107, 192, 0.35);
}
.duo-life-fill.duo-life-low {
    background: linear-gradient(90deg, #1a237e 0%, #283593 50%, #512da8 100%);
    box-shadow: 0 0 12px rgba(63, 81, 181, 0.35);
}
.duo-life-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-width: 52px;
    text-align: right;
}
body.duo-mode .game-center-frame > .duo-life-bar-wrapper {
    flex: 1 1 100%;
}
.game-mode-modal .modal-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.42);
    display: flex;
    justify-content: center;
    align-items: center;
}
.game-mode-modal .modal-header h2 {
    color: #2196f3;
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}
.game-mode-modal .modal-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tab-navigation {
    display: flex;
    border-bottom: 1px solid rgba(139, 92, 246, 0.38);
    margin-bottom: 20px;
    background: rgba(7, 20, 38, 0.4);
    border-radius: 8px 8px 0 0;
}
.tab-button {
    flex: 1;
    padding: 11px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    color: #64b5f6;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab-button:hover {
    background: rgba(33, 150, 243, 0.07);
    color: #e3f2fd;
}
.tab-button.active {
    border-bottom: 2px solid #2196f3;
    color: #2196f3;
    font-weight: 500;
    background-color: rgba(33, 150, 243, 0.1);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.themes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}
.theme-item {
    background-color: #0d2137;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.42);
}
.theme-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    background-color: #102b44;
    border-color: rgba(33, 150, 243, 0.4);
}
.theme-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.theme-header h3 {
    margin: 0;
    font-size: 16px;
    color: #e3f2fd;
}
.theme-count {
    margin: 0;
    font-size: 13px;
    color: #b3e5fc;
}
.theme-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}
.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0a1929;
    transition: .4s;
    border-radius: 24px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: #b3e5fc;
    transition: .4s;
    border-radius: 50%;
}
.theme-toggle input:checked + .toggle-slider {
    background-color: #2196F3;
    border-color: #2196F3;
}
.theme-toggle input:focus + .toggle-slider {
    box-shadow: 0 0 1px #2196F3;
}
.theme-toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background-color: #e3f2fd;
}
@media screen and (max-width: 767px) {
    .themes-container {
        grid-template-columns: 1fr;
    }
    .tab-button {
        font-size: 14px;
        padding: 10px;
    }
}
.custom-grid-modal .modal-content {
    color: #b3e5fc;
}
.custom-grid-modal textarea {
    background-color: #0d2137;
    color: #e3f2fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.custom-grid-modal textarea:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.25);
}
.themes-container::-webkit-scrollbar {
    width: 8px;
}
.themes-container::-webkit-scrollbar-track {
    background: #0a1929;
    border-radius: 4px;
}
.themes-container::-webkit-scrollbar-thumb {
    background-color: rgba(33, 150, 243, 0.3);
    border-radius: 4px;
    border: 2px solid #0a1929;
}
.themes-container::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.5);
}
.leave-room-btn {
    background: rgba(229, 57, 53, 0.18);
    color: #ef9a9a;
    border: 1px solid rgba(229, 57, 53, 0.38);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    width: 100%;
}
.leave-room-btn:hover {
    background: rgba(229, 57, 53, 0.32);
    border-color: rgba(229, 57, 53, 0.6);
    color: #ffcdd2;
    transform: translateY(-1px);
}
.leave-room-btn:active {
    transform: translateY(1px);
}
.leave-room-btn i {
    font-size: 14px;
}
@media screen and (max-width: 767px) {
    .leave-room-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}
.menu-section.disabled-section {
    opacity: 0.42;
    pointer-events: none;
    cursor: not-allowed;
    filter: saturate(0.4);
}
.menu-section.disabled-section .team-control-btn,
.menu-section.disabled-section .custom-grid-btn,
.menu-section.disabled-section .team-remove-btn,
.team-control-btn.disabled,
.custom-grid-btn.disabled,
.team-remove-btn.disabled {
    cursor: not-allowed !important;
}
.teams-control-info,
.custom-grid-info {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 10px;
    font-size: 11px;
    color: #ffecb3;
    display: flex;
    align-items: center;
    gap: 6px;
}
.teams-control-info i,
.custom-grid-info i {
    color: #ffc107;
    font-size: 12px;
    flex-shrink: 0;
}
@media screen and (max-width: 767px) {
    .teams-control-info,
    .custom-grid-info {
        font-size: 10px;
        padding: 6px 8px;
        margin-top: 8px;
    }
    .teams-control-info i,
    .custom-grid-info i {
        font-size: 11px;
    }
}
#duo-progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(16, 42, 67, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin-top: 10px;
}
.duo-round-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
#duo-round-text {
    font-size: 18px;
    font-weight: 500;
    color: #2196f3;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#duo-target-text {
    font-size: 14px;
    color: #b3e5fc;
    font-weight: 400;
}
.duo-dots-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.duo-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #d32f2f;
    border: 2px solid rgba(211, 47, 47, 0.7);
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.duo-dot.validated {
    background-color: #4caf50;
    border-color: rgba(76, 175, 80, 0.7);
    animation: dotValidated 0.5s ease;
}
.duo-dot.passed {
    background-color: transparent;
    border: 2px solid #f97316;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}
.duo-dot.passed.current {
    border-color: #2196f3;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.5), 0 0 8px rgba(249, 115, 22, 0.3);
}
.duo-dot.current {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
    border-color: #2196f3;
}
@keyframes dotValidated {
    0% {
        transform: scale(1);
        background-color: #d32f2f;
    }
    50% {
        transform: scale(1.3);
        background-color: #ffeb3b;
    }
    100% {
        transform: scale(1);
        background-color: #4caf50;
    }
}
/* ── Mode DUO ── */
/* Même design que mode duel : équipe DUO dans la sidebar gauche */
body.duo-mode #teams-right {
    display: none;
}
body.duo-mode .game-center-frame {
    margin-left: 240px;
    margin-right: 240px;
    width: calc(100vw - 480px);
    max-width: 940px;
}
@media screen and (max-width: 1280px) and (min-width: 1025px) {
    body.duo-mode .game-center-frame {
        margin-left: 205px;
        margin-right: 205px;
        width: calc(100vw - 410px);
    }
}
@media screen and (max-width: 1024px) {
    body.duo-mode .game-center-frame {
        margin-left: 0;
        margin-right: 0;
        width: 88%;
        max-width: 700px;
    }
    body.duo-mode #teams-left {
        width: 100%;
    }
}
@media screen and (max-width: 600px) {
    body.duo-mode .game-center-frame {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100vw;
    }
}
@media screen and (max-width: 767px) {
    #duo-progress-container {
        padding: 10px;
        margin-top: 5px;
    }
    #duo-round-text {
        font-size: 16px;
    }
    #duo-target-text {
        font-size: 12px;
    }
    .duo-dot {
        width: 16px;
        height: 16px;
    }
    .duo-dots-container {
        gap: 6px;
    }
}
@media screen and (min-width: 768px) and (max-height: 900px) {
    #duo-progress-container {
        padding: 10px;
        margin-top: 8px;
    }
    #duo-round-text {
        font-size: 16px;
    }
    #duo-target-text {
        font-size: 13px;
    }
    .duo-dot {
        width: 18px;
        height: 18px;
    }
}
.nightmare-mode {
    background: rgba(139, 0, 139, 0.1) !important;
    border: 1px solid rgba(139, 0, 139, 0.3) !important;
    position: relative;
    overflow: hidden;
}
.nightmare-mode::before {
    background: linear-gradient(90deg, transparent, #8b008b, transparent) !important;
}
.nightmare-mode::after {
    content: '💀';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    opacity: 0.7;
    animation: nightmareFloat 3s ease-in-out infinite;
}
@keyframes nightmareFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-10px) rotate(10deg);
        opacity: 1;
    }
}
.nightmare-mode:hover {
    background: rgba(139, 0, 139, 0.2) !important;
    border-color: rgba(139, 0, 139, 0.5) !important;
    box-shadow: 0 4px 20px rgba(139, 0, 139, 0.3) !important;
}
.nightmare-mode h3 {
    color: #da70d6 !important;
    text-shadow: 0 0 10px rgba(218, 112, 214, 0.3);
}
.nightmare-mode p {
    color: #dda0dd !important;
}
#gameplay.steal-timer-mode {
    background: linear-gradient(135deg, rgba(0, 206, 209, 0.1), rgba(0, 0, 0, 0.3)) !important;
    border-color: rgba(0, 206, 209, 0.6) !important;
    box-shadow: 0 0 15px rgba(0, 206, 209, 0.1) !important;
}
#gameplay.steal-timer-mode::before {
    background: linear-gradient(90deg, transparent, rgba(0, 206, 209, 0.3), transparent) !important;
    animation: stealTimerFloat 3s ease-in-out infinite;
}
@keyframes stealTimerFloat {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}
#gameplay.steal-timer-mode h3 {
    color: #00ced1 !important;
}
#gameplay.steal-timer-mode p {
    color: #87ceeb !important;
}
.steal-timer-mode.nightmare-mode,
.nightmare-mode.steal-timer-mode {
    background: linear-gradient(135deg, rgba(0, 206, 209, 0.1), rgba(0, 0, 0, 0.3)) !important;
    border-color: rgba(0, 206, 209, 0.6) !important;
    box-shadow: 0 0 15px rgba(0, 206, 209, 0.1) !important;
}
.steal-timer-mode.nightmare-mode::before,
.nightmare-mode.steal-timer-mode::before {
    background: linear-gradient(90deg, transparent, rgba(0, 206, 209, 0.3), transparent) !important;
    animation: stealTimerFloat 3s ease-in-out infinite;
}
@media screen and (max-width: 767px) {
    .nightmare-mode {
        background: rgba(139, 0, 139, 0.1) !important;
        border: 1px solid rgba(139, 0, 139, 0.3) !important;
        position: relative;
        overflow: hidden;
    }
    .nightmare-mode::before {
        background: linear-gradient(90deg, transparent, #8b008b, transparent) !important;
    }
    .nightmare-mode::after {
        content: '💀';
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 24px;
        opacity: 0.7;
        animation: nightmareFloat 3s ease-in-out infinite;
    }
    @keyframes nightmareFloat {
        0%, 100% {
            transform: translateY(0) rotate(0deg);
            opacity: 0.7;
        }
        50% {
            transform: translateY(-10px) rotate(10deg);
            opacity: 1;
        }
    }
    .nightmare-mode:hover {
        background: rgba(139, 0, 139, 0.2) !important;
        border-color: rgba(139, 0, 139, 0.5) !important;
        box-shadow: 0 4px 20px rgba(139, 0, 139, 0.3) !important;
    }
    .nightmare-mode h3 {
        color: #da70d6 !important;
        text-shadow: 0 0 10px rgba(218, 112, 214, 0.3);
    }
    .nightmare-mode p {
        color: #dda0dd !important;
    }
}
.vote-progress {
    margin: 20px 0;
    padding: 15px;
    background: rgba(16, 42, 67, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.42);
}
.vote-info {
    text-align: center;
    margin-bottom: 10px;
    color: #b3e5fc;
    font-size: 14px;
    font-weight: 500;
}
.vote-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(16, 42, 67, 0.7);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.1);
}
#vote-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196f3, #64b5f6);
    transition: width 0.5s ease;
    border-radius: 4px;
}
.vote-results {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    gap: 10px;
}
.vote-result {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}
.vote-result.yes {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #81c784;
}
.vote-result.no {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #e57373;
}
#vote-yes-btn {
    background: #4caf50 !important;
    color: white !important;
    font-size: 12px !important;
}
#vote-yes-btn:hover {
    background: #388e3c !important;
}
#vote-no-btn {
    background: #f44336 !important;
    color: white !important;
    font-size: 12px !important;
}
#vote-no-btn:hover {
    background: #d32f2f !important;
}
#vote-yes-btn:disabled,
#vote-no-btn:disabled {
    background: rgba(100, 100, 100, 0.5) !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6 !important;
}
#cancel-word-modal .modal-button {
    font-size: 12px !important;
}
#cancel-word-modal .modal-button.cancel {
    font-size: 12px !important;
}
@media screen and (max-width: 767px) {
    .cancel-word-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 0.9em;
    }
    .vote-progress {
        padding: 12px;
        margin: 15px 0;
    }
    .vote-info {
        font-size: 13px;
    }
    .vote-result {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 50px;
    }
}
.jokers-container {
    display: flex;
    gap: 4px;
    align-items: center;
    margin: 0 8px;
}
.joker-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 2px solid #ff6b35;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    position: relative;
    overflow: hidden;
}
.joker-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #ff6b35;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}
.joker-dot:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #ffed4e, #ffd700);
}
.joker-dot:hover::before {
    width: 8px;
    height: 8px;
    background: #ff4757;
}
.joker-dot:active {
    transform: scale(0.9);
}
.joker-dot.not-gained {
    background: linear-gradient(135deg, #666, #444);
    border-color: #555;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.4;
    cursor: default;
}
.joker-dot.not-gained::before {
    background: #555;
}
.joker-dot.not-gained:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #666, #444);
}
.joker-dot.not-gained:hover::before {
    width: 6px;
    height: 6px;
    background: #555;
}
.joker-dot.not-gained:active {
    transform: none;
}
.joker-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}
.joker-option {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 2px solid #3498db;
    border-radius: 3px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: white;
    position: relative;
    overflow: hidden;
}
.joker-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}
.joker-option:hover::before {
    left: 100%;
}
.joker-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    border-color: #5dade2;
}
.joker-option:active {
    transform: translateY(0);
}
.joker-option .joker-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}
.joker-option h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #3498db;
}
.joker-option p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}
.joker-option[onclick*="event"] {
    border-color: #e74c3c;
}
.joker-option[onclick*="event"]:hover {
    border-color: #ec7063;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}
.joker-option[onclick*="event"] h3 {
    color: #e74c3c;
}
.joker-option[onclick*="steal"] {
    border-color: #f39c12;
}
.joker-option[onclick*="steal"]:hover {
    border-color: #f7dc6f;
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3);
}
.joker-option[onclick*="steal"] h3 {
    color: #f39c12;
}
.joker-option[onclick*="combo"] {
    border-color: #9b59b6;
}
.joker-option[onclick*="combo"]:hover {
    border-color: #bb8fce;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.3);
}
.joker-option[onclick*="combo"] h3 {
    color: #9b59b6;
}
@keyframes jokerCardAppear {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.console-message.joker-gained {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 237, 78, 0.05));
    border-left: 4px solid #ffd700;
    color: #ffd700;
}
@keyframes jokerGainedPulse {
    0% {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 237, 78, 0.2));
        transform: scale(1.02);
    }
    50% {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 237, 78, 0.1));
        transform: scale(1.01);
    }
    100% {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 237, 78, 0.05));
        transform: scale(1);
    }
}
@keyframes jokerCardGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    }
}
.joker-card {
    animation: jokerCardAppear 0.8s ease-out;
}
#joker-vote-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    z-index: 10001 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}
.joker-vote-card {
    animation: jokerCardAppear 0.8s ease-out;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    height: auto;
    min-height: 500px;
    border-radius: 15px;
    position: relative;
    perspective: 1000px;
    margin: 0 auto;
    box-sizing: border-box;
}
.joker-card-inner {
    position: relative;
    width: 100%;
    height: 600px;
    max-height: 90vh;
    text-align: center;
    transition: transform 1.2s ease-in-out;
    transform-style: preserve-3d;
    border-radius: 15px;
    box-sizing: border-box;
}
.joker-card-inner.flipped {
    transform: rotateY(180deg);
}
.joker-card-front, .joker-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
}
.joker-card-front {
    background: linear-gradient(145deg, rgba(14, 30, 62, 0.92) 0%, rgba(20, 45, 90, 0.88) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(167, 139, 250, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(100, 180, 255, 0.07);
}
.joker-card-back {
    background: linear-gradient(145deg, rgba(14, 30, 62, 0.92) 0%, rgba(20, 45, 90, 0.88) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(167, 139, 250, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(100, 180, 255, 0.07);
    transform: rotateY(180deg);
}
.joker-card-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(80, 190, 255, 0.7), transparent);
    border-radius: 15px 15px 0 0;
}
.joker-image-large {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
}
.joker-title {
    color: #64b5f6;
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}
.joker-subtitle {
    color: #90caf9;
    font-size: 18px;
    margin: 10px 0 0 0;
    opacity: 0.95;
}
.joker-vote-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
}
.joker-vote-option {
    background: linear-gradient(135deg, rgba(14, 35, 70, 0.85) 0%, rgba(20, 50, 95, 0.8) 100%);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 6px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(100, 180, 255, 0.05);
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.joker-vote-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.5s ease;
}
.joker-vote-option:hover::before {
    left: 100%;
}
.joker-vote-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.2), inset 0 1px 0 rgba(100, 180, 255, 0.1);
}
.joker-vote-option:active {
    transform: scale(0.98);
}
.joker-vote-option:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.4);
}
.joker-vote-option:focus:not(:focus-visible) {
    box-shadow: none;
}
.joker-vote-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.joker-vote-option:disabled:hover {
    transform: none;
    box-shadow: none;
}
.joker-vote-option.voted {
    border-color: rgba(33, 150, 243, 0.6);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.2), inset 0 1px 0 rgba(100, 180, 255, 0.1);
    background: linear-gradient(135deg, rgba(20, 50, 95, 0.95) 0%, rgba(25, 60, 110, 0.9) 100%);
}
.joker-vote-option .joker-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.joker-vote-option .option-content {
    flex: 1;
}
.joker-vote-option h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
}
.joker-vote-option p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.3;
}
.vote-count {
    font-size: 14px;
    font-weight: 500;
    margin-left: auto;
    flex-shrink: 0;
}
.joker-vote-option[data-option="event"] {
    border-color: rgba(239, 83, 80, 0.5);
}
.joker-vote-option[data-option="event"]:hover {
    box-shadow: 0 8px 24px rgba(239, 83, 80, 0.25);
    border-color: rgba(239, 83, 80, 0.7);
}
.joker-vote-option[data-option="event"] h3 {
    color: #ef5350;
}
.joker-vote-option[data-option="event"] .vote-count {
    color: #ef5350;
}
.joker-vote-option[data-option="steal"] {
    border-color: rgba(255, 167, 38, 0.5);
}
.joker-vote-option[data-option="steal"]:hover {
    box-shadow: 0 8px 24px rgba(255, 167, 38, 0.25);
    border-color: rgba(255, 167, 38, 0.7);
}
.joker-vote-option[data-option="steal"] h3 {
    color: #ffa726;
}
.joker-vote-option[data-option="steal"] .vote-count {
    color: #ffa726;
}
.joker-vote-option[data-option="combo"] {
    border-color: rgba(171, 71, 188, 0.5);
}
.joker-vote-option[data-option="combo"]:hover {
    box-shadow: 0 8px 24px rgba(171, 71, 188, 0.25);
    border-color: rgba(171, 71, 188, 0.7);
}
.joker-vote-option[data-option="combo"] h3 {
    color: #ab47bc;
}
.joker-vote-option[data-option="combo"] .vote-count {
    color: #ab47bc;
}
.joker-vote-option.avalanche-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-color: #666 !important;
    position: relative;
}
.joker-vote-option.avalanche-disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.1) 20px
    );
    pointer-events: none;
}
.joker-vote-option.avalanche-disabled h3 {
    color: #999 !important;
}
.joker-vote-option.avalanche-disabled .vote-count {
    color: #999 !important;
}
.joker-vote-option.avalanche-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}
.joker-vote-option.joker-used-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-color: #666 !important;
    position: relative;
}
.joker-vote-option.joker-used-disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.1) 20px
    );
    pointer-events: none;
}
.joker-vote-option.joker-used-disabled h3 {
    color: #999 !important;
}
.joker-vote-option.joker-used-disabled .vote-count {
    color: #999 !important;
}
.joker-vote-option.joker-used-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}
.avalanche-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    pointer-events: none;
    border-radius: 3px;
}
.joker-vote-info {
    margin-top: 15px;
    padding: 10px 12px;
    background: rgba(33, 150, 243, 0.08);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    width: 100%;
    box-shadow: inset 0 1px 0 rgba(100, 180, 255, 0.05);
}
.joker-vote-info p {
    margin: 0;
    font-size: 12px;
    color: #90caf9;
    text-align: center;
    line-height: 1.4;
}
.vote-status {
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-size: 12px;
    color: #ccc;
    text-align: center;
    width: 100%;
}
@media (max-width: 1024px) {
    #joker-vote-overlay {
        padding: 15px !important;
    }
    .joker-vote-card {
        max-width: 400px;
        min-height: 550px;
    }
    .joker-card-inner {
        height: 550px;
    }
}
@media (max-width: 768px) {
    #joker-vote-overlay {
        padding: 10px !important;
    }
    .joker-vote-card {
        max-width: 90%;
        width: 100%;
        min-height: 600px;
        max-height: 95vh;
    }
    .joker-card-inner {
        height: auto;
        min-height: 600px;
        max-height: 95vh;
    }
    .joker-card-front, .joker-card-back {
        padding: 20px;
        overflow-y: auto;
    }
    #joker-resume-timer {
        font-size: 16px !important;
        padding: 12px !important;
        margin: 15px 0 !important;
    }
    .joker-image-large {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .joker-title {
        font-size: 22px;
    }
    .joker-subtitle {
        font-size: 16px;
    }
    .joker-vote-options {
        gap: 10px;
        margin: 15px 0;
    }
    .joker-vote-option {
        padding: 10px 12px;
    }
    .joker-vote-option .joker-icon {
        font-size: 20px;
    }
    .joker-vote-option h3 {
        font-size: 14px;
    }
    .joker-vote-option p {
        font-size: 11px;
    }
    .vote-count {
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    #joker-vote-overlay {
        padding: 5px !important;
    }
    .joker-vote-card {
        max-width: 95%;
        min-height: 550px;
        max-height: 95vh;
    }
    .joker-card-inner {
        height: auto;
        min-height: 550px;
        max-height: 95vh;
    }
    .joker-card-front, .joker-card-back {
        padding: 15px;
        overflow-y: auto;
    }
    .joker-title {
        font-size: 20px;
    }
    #joker-resume-timer {
        font-size: 14px !important;
        padding: 10px !important;
        margin: 15px 0 !important;
    }
    .joker-vote-option {
        padding: 8px 10px;
    }
    .joker-vote-option h3 {
        font-size: 13px;
    }
    .joker-vote-option p {
        font-size: 10px;
    }
}
@media (max-height: 600px) and (orientation: landscape) {
    #joker-vote-overlay {
        padding: 5px !important;
        overflow-y: auto !important;
    }
    .joker-vote-card {
        max-width: 500px;
        min-height: auto;
        max-height: 95vh;
    }
    .joker-card-inner {
        height: auto;
        max-height: 95vh;
        min-height: 400px;
    }
    .joker-card-front, .joker-card-back {
        padding: 15px 20px;
    }
    .joker-vote-options {
        gap: 8px;
        margin: 10px 0;
    }
    .joker-vote-option {
        padding: 8px 10px;
    }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@media (max-width: 768px) {
    .jokers-container {
        gap: 3px;
        margin: 0 4px;
    }
    .joker-dot {
        width: 10px;
        height: 10px;
    }
    .joker-dot::before {
        width: 4px;
        height: 4px;
    }
    .joker-options {
        gap: 12px;
    }
    .joker-option {
        padding: 15px;
    }
    .joker-option .joker-icon {
        font-size: 24px;
    }
    .joker-option h3 {
        font-size: 16px;
    }
    .joker-option p {
        font-size: 13px;
    }
}
.leaderboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 12, 28, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.25s ease;
}
.leaderboard-modal {
    background: rgba(14, 30, 62, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 4px;
    padding: 0;
    max-width: 95%;
    max-height: 80vh;
    width: 900px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}
.leaderboard-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.8), transparent);
    z-index: 1;
}
.leaderboard-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(33, 150, 243, 0.2);
    background: rgba(33, 150, 243, 0.06);
    flex-shrink: 0;
}
.leaderboard-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.leaderboard-header h2 {
    margin: 0;
    color: #2196f3;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.leaderboard-header h2 i {
    color: #ffd700;
}
.close-leaderboard {
    background: none;
    border: none;
    color: #64b5f6;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s ease;
}
.close-leaderboard:hover {
    color: #2196f3;
    transform: scale(1.1);
}
.leaderboard-search-container {
    position: relative;
    display: flex;
    align-items: center;
}
.leaderboard-search-container i {
    position: absolute;
    left: 12px;
    color: #90caf9;
    font-size: 14px;
    z-index: 1;
}
.leaderboard-search-input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    background: rgba(7, 20, 50, 0.7);
    border: 1px solid rgba(33, 150, 243, 0.25);
    border-radius: 4px;
    color: #e3f2fd;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}
.leaderboard-search-input:focus {
    border-color: rgba(33, 150, 243, 0.6);
    background: rgba(16, 42, 67, 0.8);
}
.leaderboard-search-input::placeholder {
    color: #90caf9;
    opacity: 0.6;
}
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    display: table;
}
.leaderboard-table-wrapper {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(90vh - 120px);
}
.leaderboard-table-wrapper::-webkit-scrollbar {
    width: 8px;
}
.leaderboard-table-wrapper::-webkit-scrollbar-track {
    background: rgba(16, 42, 67, 0.5);
    border-radius: 4px;
}
.leaderboard-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.3);
    border-radius: 4px;
}
.leaderboard-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.5);
}
.leaderboard-table thead {
    background: rgba(10, 25, 55, 0.98);
    position: sticky;
    top: 0;
    z-index: 10;
    display: table-header-group;
}
.leaderboard-table thead tr {
    display: table-row;
}
.leaderboard-table th {
    padding: 8px 6px;
    text-align: left;
    color: #64b5f6;
    font-weight: 600;
    font-size: 11px;
    border-bottom: 2px solid rgba(33, 150, 243, 0.25);
    white-space: nowrap;
    display: table-cell;
}
.leaderboard-table th:first-child {
    width: 35px;
    min-width: 35px;
    text-align: center;
    padding: 8px 4px;
}
.leaderboard-table th:nth-child(2) {
    min-width: 100px;
}
.leaderboard-table th:nth-child(3) {
    min-width: 75px;
}
.leaderboard-table th:nth-child(4) {
    min-width: 75px;
}
.leaderboard-table th:nth-child(5) {
    min-width: 85px;
}
.leaderboard-table th:nth-child(6) {
    min-width: 75px;
}
.leaderboard-table th:nth-child(7) {
    min-width: 95px;
}
.leaderboard-table th:nth-child(8) {
    min-width: 75px;
}
.leaderboard-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    position: relative;
}
.leaderboard-table th.sortable:hover {
    background: rgba(33, 150, 243, 0.25);
}
.leaderboard-table th.sortable i {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.6;
}
.leaderboard-table tbody {
    display: table-row-group;
}
.leaderboard-table tbody tr {
    display: table-row;
    border-bottom: 1px solid rgba(33, 150, 243, 0.08);
    transition: background 0.2s ease;
}
.leaderboard-table tbody tr:hover {
    background: rgba(33, 150, 243, 0.1);
}
.leaderboard-table tbody tr:nth-child(even) {
    background: rgba(33, 150, 243, 0.05);
}
.leaderboard-table tbody tr:nth-child(even):hover {
    background: rgba(33, 150, 243, 0.15);
}
.leaderboard-table td {
    padding: 8px 6px;
    color: #e3f2fd;
    font-size: 11px;
    text-align: left;
    display: table-cell;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.leaderboard-table td:first-child {
    font-weight: 500;
    color: #90caf9;
    text-align: center;
    padding: 8px 4px;
}
.leaderboard-table td:nth-child(2) {
    font-weight: 500;
    color: #64b5f6;
}
.leaderboard-username-clickable {
    cursor: pointer !important;
    transition: all 0.2s ease;
    user-select: none;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(33, 150, 243, 0.12);
    border: 1px solid rgba(33, 150, 243, 0.25);
}
.leaderboard-username-clickable:hover {
    background: rgba(33, 150, 243, 0.25) !important;
    border-color: rgba(33, 150, 243, 0.5) !important;
    color: #90caf9 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}
.leaderboard-table .user-badge {
    margin-right: 4px;
    font-size: 12px;
}
.leaderboard-btn {
    width: 100%;
    padding: 8px 12px;
    background: rgba(33, 150, 243, 0.12);
    border: 1px solid rgba(33, 150, 243, 0.28);
    border-radius: 4px;
    color: #90caf9;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.leaderboard-btn:hover {
    background: rgba(33, 150, 243, 0.22);
    border-color: rgba(33, 150, 243, 0.5);
    color: #e3f2fd;
    transform: translateY(-1px);
}
.leaderboard-btn:active {
    transform: translateY(0);
}
.leaderboard-btn i {
    font-size: 14px;
}
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@media screen and (max-width: 768px) {
    .leaderboard-modal {
        width: calc(100% - 20px);
        max-width: calc(100vw - 20px);
        max-height: 75vh;
        margin: 10px;
        border-radius: 4px;
        height: auto;
    }
    .leaderboard-header {
        padding: 12px;
        flex-shrink: 0;
    }
    .leaderboard-header-top {
        margin-bottom: 10px;
    }
    .leaderboard-header h2 {
        font-size: 18px;
    }
    .leaderboard-search-input {
        padding: 8px 10px 8px 30px;
        font-size: 13px;
    }
    .leaderboard-search-container i {
        left: 10px;
        font-size: 12px;
    }
    .leaderboard-table-wrapper {
        display: none;
    }
    .leaderboard-mobile-view {
        display: block;
        overflow-y: auto;
        flex: 1;
        padding: 8px;
        max-height: calc(100vh - 80px);
    }
    .leaderboard-mobile-view::-webkit-scrollbar {
        width: 6px;
    }
    .leaderboard-mobile-view::-webkit-scrollbar-track {
        background: rgba(16, 42, 67, 0.5);
    }
    .leaderboard-mobile-view::-webkit-scrollbar-thumb {
        background: rgba(33, 150, 243, 0.3);
        border-radius: 3px;
    }
    .leaderboard-card {
        background: rgba(33, 150, 243, 0.06);
        border: 1px solid rgba(33, 150, 243, 0.18);
        border-radius: 4px;
        padding: 8px 10px;
        margin-bottom: 6px;
        transition: all 0.2s ease;
    }
    .leaderboard-card:hover {
        background: rgba(33, 150, 243, 0.12);
        border-color: rgba(33, 150, 243, 0.35);
    }
    .leaderboard-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(33, 150, 243, 0.2);
    }
    .leaderboard-card-rank {
        font-size: 16px;
        font-weight: 500;
        color: #90caf9;
        min-width: 25px;
        text-align: center;
    }
    .leaderboard-card-user {
        flex: 1;
        margin-left: 8px;
    }
    .leaderboard-card-username {
        font-size: 14px;
        font-weight: 500;
        color: #64b5f6;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        flex-wrap: wrap;
        transition: all 0.2s ease;
        user-select: none;
        padding: 3px 8px;
        border-radius: 4px;
        background: rgba(33, 150, 243, 0.1);
        border: 1px solid rgba(33, 150, 243, 0.22);
    }
    .leaderboard-card-username:hover {
        background: rgba(33, 150, 243, 0.25) !important;
        border-color: rgba(33, 150, 243, 0.5) !important;
        color: #90caf9 !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
    }
    .leaderboard-card-level-inline {
        font-size: 11px;
        color: #90caf9;
        font-weight: 400;
        margin-left: 6px;
        padding: 2px 6px;
        background: rgba(33, 150, 243, 0.15);
        border-radius: 4px;
    }
    .leaderboard-card-stats {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        margin-top: 6px;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .leaderboard-card-stats::-webkit-scrollbar {
        height: 3px;
    }
    .leaderboard-card-stats::-webkit-scrollbar-track {
        background: rgba(16, 42, 67, 0.3);
    }
    .leaderboard-card-stats::-webkit-scrollbar-thumb {
        background: rgba(33, 150, 243, 0.3);
        border-radius: 2px;
    }
    .leaderboard-card-stat {
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        min-width: fit-content;
        cursor: pointer;
        transition: background 0.2s ease;
        padding: 4px 6px;
        border-radius: 4px;
    }
    .leaderboard-card-stat:hover {
        background: rgba(33, 150, 243, 0.1);
    }
    .leaderboard-card-stat-label {
        font-size: 8px;
        color: #90caf9;
        opacity: 0.8;
        margin-bottom: 2px;
        white-space: nowrap;
        text-align: center;
    }
    .leaderboard-card-stat-value {
        font-size: 12px;
        font-weight: 500;
        color: #e3f2fd;
        white-space: nowrap;
        text-align: center;
    }
    .leaderboard-empty-message {
        text-align: center;
        padding: 40px 20px;
        color: #90caf9;
        font-size: 16px;
    }
    .leaderboard-card .user-badge {
        font-size: 12px;
    }
}
@media screen and (min-width: 769px) {
    .leaderboard-mobile-view {
        display: none;
    }
}