body {
            font-family: Arial, sans-serif;
            color: white;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 40px;
            margin: 0;
            background-color: #222;
            background-size: cover;
            background-position: center;
            background-attachment: fixed;

        }
        /* Фон главного меню */
        body.main-menu-bg {
            background-image: url('https://battlejack.ru/templates/Day/images/image_1.jpg');
        }
        /* Фон игрового экрана */
        body.game-bg {
            background-image: url('https://battlejack.ru/templates/Day/images/image_2.jpg');
        }
        /* Фон таблицы лидеров */
        body.leaderboard-bg {
            background-image: url('https://battlejack.ru/templates/Day/images/image_3.jpg');
        }
        h1 {
            margin-bottom: 20px;
        }
        .screen {
            display: none;
            flex-direction: column;
            align-items: center;
            width: 100%;
           /* max-width: 500px; */
        }
        .main-menu.active,
        .game-screen.active,
        .leaderboard.active,
        .multiplayer-setup.active {
            display: flex;
        }
        button {
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
            border: none;
            border-radius: 5px;
            background-color: #e74c3c;
            color: white;
            transition: background-color 0.3s;
            margin-top: 10px;
        }
        button:hover {
            background-color: #c0392b;
        }
         #startGame {
             background-color: #139623;
            padding: 15px 40px;
         }
         #startGame:hover {
          background-color: #118720;
         }
        #startGame:disabled {
          opacity: 0.7;
          cursor: not-allowed;
          /* Сохраняем ваши оригинальные стили, но добавляем эффект disabled */
         }
        #podtv {
          background-color: #139623;
         }
        #podtv:hover {
          background-color: #118720;
         }
        #lider {
          background-color: #333;
            padding: 15px 20px;
         }
        #lider:hover {
          background-color: #444;
         }
        #cart {
          background-color: #139623;
         }
        #cart:hover {
          background-color: #118720;
         }
         #playersContainer {
        width: 100%;
        max-width: 300px;
         }
        #sbros {
          background-color: #139623;
         }
        #sbros:hover {
          background-color: #118720;
         }
         #multipleer {
             padding: 15px 35px;
         }
        #retry {
          background-color: #139623;
         }
        #retry:hover {
          background-color: #118720;
         }
        #achievementsBtn {
             padding: 15px 39px;
         }
        .hand {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 5px;
            margin: 15px 0;
            min-height: 120px;
            animation: fadeIn 0.5s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .card {
    width: 60px;
    height: 90px;
    background: white;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.animated-card {
    animation: popIn 0.3s ease-in-out;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
        .controls {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
        }
        .lives {
            font-size: 20px;
            margin: 10px 0;
        }
        .bonus-card {
            color: gold;
            font-size: 18px;
            margin-top: 10px;
        }
       /* .notification {
            position: fixed;
            top: 30px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.9);
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 18px;
            font-weight: bold;
            z-index: 1000;
            display: none;
            animation: fadeOut 0.5s ease-in-out 1.5s forwards;
        } */

.notification {
        position: fixed;
        top: 65px;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(50, 50, 50, 0.95);
        color: white;
        padding: 12px 20px;
        border-radius: 8px;
        text-align: center;
        font-size: 16px;
        display: none;
        z-index: 1000;
        width: 90%;
        max-width: 400px;
        border: 2px solid #f1c40f;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        animation: fadeInOut 3s forwards;
        opacity: 0;
    }
    
    @keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}
        .bonus-notification {
            background-color: rgba(46, 204, 113, 0.9);
            color: white;
        }
        .blackjack-notification {
            background-color: rgba(255, 215, 0, 0.9);
            color: black;
        }
        .alert-notification {
            background-color: rgba(231, 76, 60, 0.9);
            color: white;
        }
        @keyframes fadeOut {
            to {
                opacity: 0;
                visibility: hidden;
            }
        }
        table {
            max-width: 800px;
            border-collapse: collapse;
            margin: 20px 0;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            overflow: hidden;
        }

        th, td {
            padding: 12px 10px;
            text-align: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        th {
            background-color: rgba(0, 0, 0, 0.3);
            font-weight: bold;
        }
        tr:nth-child(even) {
            background-color: rgba(255, 255, 255, 0.05);
        }
        tr:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
        .final-notification {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(0, 0, 0, 0.95);
            color: white;
            padding: 30px;
            border-radius: 10px;
            font-size: 24px;
            text-align: center;
            z-index: 1000;
            display: none;
            width: 80%;
            max-width: 500px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
            line-height: 1.6;
        }
        .final-notification-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 30px;
        }
        .final-notification button {
            padding: 12px 25px;
            font-size: 18px;
            min-width: 150px;
        }
        .nickname-container {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }
        .nickname-display {
            display: flex;
            align-items: center;
            gap: 5px;
            margin: 8px;
        }
        .nickname-input {
            display: none;
            align-items: center;
            gap: 10px;
        }
        .nickname-input input {
            padding: 8px 12px;
            border-radius: 5px;
            border: none;
            font-size: 16px;
        }
        .nickname-input button {
            margin-top: 0;
            padding: 8px 15px;
        }
        .edit-icon {
            width: 16px;
            height: 16px;
            cursor: pointer;
            opacity: 0.7;
            transition: opacity 0.3s;
            z-index: 1;
        }
        .edit-icon:hover {
            opacity: 1;
        }
        .leaderboard-buttons {
            display: flex;
            gap: 15px;
        }
        .multiplayer-info {
            margin-bottom: 20px;
            background-color: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 8px;
            max-width: 400px;
        }
        .multiplayer-info label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        .multiplayer-info input {
            width: 100%;
            padding: 8px 10px;
            border-radius: 5px;
            border: none;
            font-size: 16px;
            box-sizing: border-box;
        }
        .score-selector {
            margin-top: 20px;
            background-color: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 8px;
            max-width: 400px;
        }
        .score-selector label {
            display: block;
            margin-bottom: 10px;
            font-weight: bold;
        }
        .score-options {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
        }
        .score-option {
            padding: 8px 15px;
            background-color: #3498db;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
            min-width: 80px;
            text-align: center;
        }
        .score-option:hover {
            background-color: #2980b9;
        }
        .score-option.selected {
            background-color: #e74c3c;
        }
        .current-player-info {
            font-size: 20px;
            padding-top: 75px;
            /*background-color: rgba(0, 0, 0, 0.3);*/
            border-radius: 8px;
            color: #f1c40f;
        }
          #passMessage strong {
            color: #f1c40f;
             }
        .pass-notification {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(0, 0, 0, 0.95);
            color: white;
            padding: 30px;
            border-radius: 10px;
            font-size: 24px;
            text-align: center;
            z-index: 1000;
            display: none;
            width: 80%;
            max-width: 500px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
        }
        .pass-notification-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 30px;
        }
        .pass-notification button {
            padding: 12px 25px;
            font-size: 18px;
            min-width: 150px;
        }
        .final-player-name {
            font-size: 28px;
            font-weight: bold;
            margin: 10px 0;
            color: #f1c40f;
        }
        .final-score {
            font-size: 36px;
            font-weight: bold;
            margin: 15px 0;
            color: #fff;
        }
        .final-round-info {
            font-size: 20px;
            margin: 15px 0;
            color: #ccc;
        }
        .final-winner {
            font-size: 24px;
            margin: 20px 0;
            color: #2ecc71;
        }
        .add-player-btn {
            background-color: #7f8c8d;
            border-radius: 8px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            cursor: pointer;
            color: white;
            transition: background-color 0.3s;
        }
        .add-player-btn:hover {
            background-color: #95a5a6;
        }
        .player-input-container {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .remove-player-btn {
            background-color: transparent;
            color: #e74c3c;
            transition: all 0.3s;
            padding: 0;
            margin-top: -3px;
        }
        .remove-player-btn:hover {
            color: #fff;
            background: none;
        }
        .player-name-display {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 10px;
            color: #f1c40f;
        }
        .sound-control {
            position: fixed;
            top: 15px;
            left: 10px;
            width: 30px;
            height: 30px;
            cursor: pointer;
            z-index: 1000;
            opacity: 0.7;
            transition: opacity 0.3s;
        }
        .sound-control:hover {
            opacity: 1;
        }
        .sound-control.muted svg line {
            stroke: #e74c3c;
            stroke-width: 2;
        }
.fixed-color-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 50px; /* Высота футера */

    font-size: 13px;
    /* Выравнивание текста по центру */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}
#title {
    display: block;
    font-size: 3.5em;
    margin-block-start: 0.67em;
    /* margin-block-end: 0.67em; */
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}
#title2 {
    display: block;
    font-size: 1.7em;
    /* margin-block-start: 0.67em; */
    margin-block-end: 0.67em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

.text {
    font-weight: bold;
    font-family: sans-serif;
  font-size: 14px;
  -webkit-mask-image: linear-gradient(-75deg, rgba(0, 0, 0, .7) 30%, #000 50%, rgba(0, 0, 0, .7) 70%);
  -webkit-mask-size: 200%;
  animation: wave 2s infinite;
}

@-webkit-keyframes wave {
  from {
    -webkit-mask-position: 150%;
  }
  to {
    -webkit-mask-position: -50%;
  }
}

/* Показываем футер только на главном экране */
body.main-menu-bg .fixed-color-footer {
    display: flex;
}

.fixed-color-footer {
    display: none;
}

/* Добавьте эти стили в конец файла styles.css */

/* Кнопка авторизации */
.auth-button {
    position: fixed;
    top: 11px;
    right: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
}

.auth-button:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Показываем футер только на главном экране */
body.main-menu-bg .auth-button {
    display: flex;
}

.auth-button {
    display: none;
}

/* Показываем футер только на главном экране */
body.main-menu-bg .exit-button {
    display: none;
}

.exit-button {
    display: flex;
}

/* Показываем футер только на главном экране */
#pvpRealMenu .auth-button {
    display: none;
}

/* Стили для таблицы лидеров */
.rank-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-weight: bold;
    color: white;
}

.rank-badge.gold {
    background-color: #FFD700;
    box-shadow: 0 0 5px #FFD700;
}

.rank-badge.silver {
    background-color: #C0C0C0;
    box-shadow: 0 0 5px #C0C0C0;
}

.rank-badge.bronze {
    background-color: #CD7F32;
    box-shadow: 0 0 5px #CD7F32;
}

.rank-badge.top10 {
    background-color: #3498db;
    box-shadow: 0 0 5px #3498db;
}

.rank-badge {
    background-color: #7f8c8d;
    box-shadow: 0 0 5px #7f8c8d;
}

.current-user {
   /* background-color: rgba(46, 204, 113, 0.2) !important; */
}

.current-user td {
    font-weight: bold;
}

.exit-button {
    position: fixed;
    top: 11px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    z-index: 1000;
    transition: background-color 0.3s;
}

.exit-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.exit-button svg {
    width: 24px;
    height: 24px;
}

/* Адаптация для мобильных */

@media (max-width: 760px) {
    /* Фон главного меню */
        body.main-menu-bg {
            background-image: url('https://battlejack.ru/templates/Day/images/fon3.jpg');
        }
        /* Фон игрового экрана */
        body.game-bg {
            background-image: url('https://battlejack.ru/templates/Day/images/fon.jpg');
        }
        /* Фон таблицы лидеров */
        body.leaderboard-bg {
            background-image: url('https://battlejack.ru/templates/Day/images/fon2.jpg');
        }
    #title {
        text-align: center;
        margin-block-start: 2.67em;
        font-size: 3em;
        margin-block-end: 0.2em;
    }
    #title2 {
   margin-bottom: 20px;
   font-size: 1.2em;
    }
    .notification {
        top: 30px;
        font-size: 16px;
        padding: 10px;
        width: 90%;
        }

    .sound-control {
    left: 10px;
    }
    .player-name-display {
    margin-top: 75px;
    margin-bottom: 0px;
    }
    body {
            padding: 0px;
        background-color: #222;
        }
    .screen {
            max-width: 600px;
        }
    .game-area {
            width: 100%;
        }    
}

@media (max-width: 600px) {
    table {
        font-size: 7px;
        max-width: 350px;
    }
    th, td {
        padding: 8px 7px; /* Уменьшаем отступы */
    }
    .screen {
            max-width: 300px;
        }
    #multiplayerSetup {
           max-width: 350px;
           margin-top: 50px;
                 }
        #leaderboard {
           margin-top: 50px;
           max-width: 350px;
                 }
    .auth-button {
        top: 11px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .exit-button {
        top: 17px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    body.main-menu-bg .fixed-color-footer {
    display: none;
    }
    .score-option {
     min-width: 53px;
    }
}

/* Добавить в styles.css */
.leaderboard-table th:nth-child(6),
.leaderboard-table td:nth-child(6) {
    width: 120px;
    text-align: center;
}

.leaderboard-table th:nth-child(7),
.leaderboard-table td:nth-child(7) {
    width: 80px;
    text-align: center;
}

#leaderboard-body {
    display: block;
    max-height: 800px; /* Настройте высоту по необходимости */
    overflow-y: auto;
    width: 100%;
    scrollbar-width: none;
    scrollbar-color: rgba(241, 196, 15, 0.5) transparent;
}

#leaderboard-body tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* Фиксируем заголовки */
.leaderboard table {
    background-color: #222;
    width: 100%;
    border-collapse: collapse;
}

.leaderboard thead {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.leaderboard th {
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10;
}

#leaderboard-body::-webkit-scrollbar {
    width: 8px;
    background-color: transparent;
}

#leaderboard-body::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius: 4px;
}

#leaderboard-body::-webkit-scrollbar-thumb {
    background-color: rgba(241, 196, 15, 0.5);
    border-radius: 4px;
}

#leaderboard-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(241, 196, 15, 0.7);
}


/* Адаптация для мобильных */
@media (max-width: 600px) {
    #leaderboard-body {
        max-height: 800px;
    }
    .leaderboard-table th:nth-child(6),
    .leaderboard-table td:nth-child(6) {
    width: 25px;
    text-align: center;
    }
}

#pvpBtn {
    background-color: #3498db;
    padding: 15px;
    margin-top: 10px;
}
#pvpBtn:hover {
    background-color: #2980b9;
}
.pvp-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.pvp-screen.active {
    display: flex;
}
.card.red {
    color: #e74c3c;
}

.card.hidden {
    color: white;
    background-color: #555;
    border: 1px solid #777;
}

button:disabled {
    background-color: #555 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

button:disabled:hover {
    background-color: #555 !important;
}

audio {
    transition: volume 0.5s ease;
}

.nickname-container {
    position: relative;
    min-height: 40px;
    margin-bottom: 0px;
    display: flex;
    justify-content: center;
    width: 100%;
}

#nicknameLoading, 
.nickname-display {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 0;
    left: 0;
}

#nicknameLoading {
    color: #fff;
    padding-top: 6px;
}

.nickname-display {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nickname-display.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Обновляем стили для иконки звука */
.sound-control.all-on svg path {
    fill: #2ecc71; /* зеленый когда все включено */
}

.sound-control.effects-only svg path {
    fill: #f1c40f; /* желтый когда только эффекты */
}

.sound-control.all-off svg path {
    fill: #e74c3c; /* красный когда все выключено */
}

.sound-control svg line {
    stroke-width: 2;
    stroke-linecap: round;
}

.sound-control.all-on svg line {
    stroke: transparent;
}

.sound-control.effects-only svg line {
    stroke: #f1c40f;
}

.sound-control.all-off svg line {
    stroke: #e74c3c;
}

.pvp-challenge-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 1001;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    border: 2px solid #f1c40f;
}

.pvp-challenge-content h3 {
    color: #f1c40f;
    margin-bottom: 10px;
}

.pvp-challenge-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.pvp-challenge-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

#confirmExit {
    background-color: #139623;
    color: white;
}

#confirmExit:hover {
    background-color: #118920;
}

#cancelExit {
    background-color: #e74c3c;
    color: white;
}

#cancelExit:hover {
    background-color: #c0392b;
}

/* Окно выбора режима игры */
.game-mode-menu {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 80px 0 0;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.game-mode-menu.active {
    display: flex;
}

.game-mode-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin: 20px 0;
}

.game-mode-options button {
    width: 35%;
    padding: 15px;
    font-size: 18px;
    margin: 0;
}

.back-button {
    background-color: #333;
    margin-top: 20px;
}

.back-button:hover {
    background-color: #444;
}

#gameModeBtn {
    background-color: #3498db;
    padding: 15px 45px;
    margin-top: 10px;
}

#gameModeBtn:hover {
    background-color: #2980b9;
}

@media (max-width: 600px) {
    .game-mode-menu {
       width: 80%;
        margin: 210px 0 0;
    }
    
    .game-mode-options button {
        width: 55%;
    }
}