* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: linear-gradient(180deg, #2d4a5a 0%, #1e3a4a 50%, #1a2f3d 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: white;
    user-select: none;
    min-height: 100vh;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* === HUD - Верхняя панель === */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 16px;
    z-index: 100;
    pointer-events: none;
}

#fps-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

#fps-text {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 65px;
}

#fps-graph {
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

#device-name {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#squirrel-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

#squirrel-icon {
    font-size: 18px;
}

#squirrel-count-hud {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 30px;
    text-align: right;
}

/* === UI Screens === */
.ui-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* === Start Screen === */
#start-screen {
    background: rgba(0, 0, 0, 0.5);
    padding-bottom: 12vh;
}

/* Скрываем HUD на стартовом экране, экранах результатов, при отсчёте и в дуэли */
#start-screen:not(.hidden)~#hud,
body:has(#start-screen:not(.hidden)) #hud,
body:has(#result-screen:not(.hidden)) #hud,
body:has(#duel-result-screen:not(.hidden)) #hud,
body:has(#countdown-overlay:not(.hidden)) #hud,
body:has(#duel-type-modal:not(.hidden)) #hud,
body.duel-active #hud {
    display: none;
}

.start-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 320px;
}



/* Логотип */
.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    padding: 12px 24px;
    border-radius: 20px;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
}

.tg-logo {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 4px 15px rgba(55, 174, 226, 0.4));
}

.app-title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Описание */
.app-description {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 10px 0 20px 0;
}

/* Кнопки */
.btn-white {
    width: 100%;
    max-width: 240px;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 600;
    color: #1a2f3d;
    background: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-white:active {
    transform: scale(0.96);
}

.btn-yellow {
    width: 100%;
    max-width: 240px;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 600;
    color: #1a2f3d;
    background: linear-gradient(180deg, #ffd700 0%, #f5c400 100%);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-yellow:active {
    transform: scale(0.96);
}

/* Кнопка информации */
.info-button {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.info-button:active {
    background: rgba(255, 255, 255, 0.25);
}

/* Подсказка во время теста - просто текст по центру */
.game-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    z-index: 100;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

/* === Result Screen === */

.btn-emoji {
    font-size: 18px;
}

/* Кнопка информации */
.info-button {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.info-button:active {
    background: rgba(255, 255, 255, 0.25);
}

/* Test Hint - показывается во время теста */
.test-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 50;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* === Result Screen === */

/* Hint Text */
.hint-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 15px;
}

/* Info Button */
.info-button-new {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.info-button-new:active {
    background: rgba(255, 255, 255, 0.2);
}

/* === Result Screen === */
#result-screen {
    background: rgba(0, 0, 0, 0.8);
}

h2 {
    text-shadow: 0 0 10px #ff8800;
    font-size: 24px;
}

/* Result Screen */
.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 320px;
}

.result-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.score-box #squirrel-count {
    font-size: 64px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    line-height: 1;
}

.score-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rank {
    font-size: 18px;
    color: #00ff88;
    margin: 0;
}

.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.result-buttons .btn-white,
.result-buttons .btn-yellow {
    width: 100%;
    max-width: none;
}

.main-btn {
    background: linear-gradient(45deg, #ff8800, #ff5500);
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.4);
    transition: transform 0.1s;
}

.main-btn:active {
    transform: scale(0.95);
}

.shiny {
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* === Subscription Modal === */
.blur-overlay {
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
}

.glass-card {
    background: linear-gradient(145deg, rgba(40, 44, 52, 0.9), rgba(20, 20, 20, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px 20px;
    width: 90%;
    max-width: 340px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 136, 0, 0.1);
    text-align: center;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lock-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

.gradient-text {
    background: linear-gradient(to right, #fff, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 26px;
    margin: 0 0 10px 0;
    font-weight: 800;
}

.sub-desc {
    color: #b0b3b8;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.full-link {
    text-decoration: none;
    width: 100%;
    display: block;
}

.tg-btn {
    background: #2AABEE;
    color: white;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(42, 171, 238, 0.3);
    transition: all 0.2s;
}

.tg-btn:active {
    transform: scale(0.96);
}

.check-btn {
    background: linear-gradient(45deg, #43e97b, #38f9d7);
    color: #0f3d28;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.4);
    transition: all 0.2s;
    animation: pulse-green 2s infinite;
}

.check-btn:active {
    transform: scale(0.96);
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 233, 123, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(67, 233, 123, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(67, 233, 123, 0);
    }
}

/* Device Input */
.device-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    outline: none;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.device-input:focus {
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

.device-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Кликабельное имя устройства */
#device-name {
    cursor: pointer;
    transition: color 0.2s;
}

#device-name:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* === DUEL STYLES === */

/* Экран дуэли */
#duel-screen {
    background: rgba(0, 0, 0, 0.9);
}

.duel-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 350px;
    width: 100%;
}

.duel-title {
    font-size: 32px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin: 0;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }

    50% {
        text-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 136, 0, 0.4);
    }
}

.duel-versus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin: 20px 0;
}

.duel-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    min-width: 120px;
    border: 2px solid rgba(0, 255, 136, 0.3);
}

.duel-player.opponent {
    border-color: rgba(255, 85, 0, 0.3);
}

.duel-avatar {
    font-size: 40px;
    animation: float 3s ease-in-out infinite;
}

.duel-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.duel-score {
    font-size: 24px;
    font-weight: 800;
    color: #00ff88;
}

.duel-player.opponent .duel-score {
    color: #ff8800;
}

.duel-vs {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.duel-instruction {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 10px 0;
}

.btn-secondary {
    width: 100%;
    max-width: 240px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.btn-secondary:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.25);
}

/* Экран результата дуэли */
#duel-result-screen {
    background: rgba(0, 0, 0, 0.95);
}

.duel-result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 350px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.duel-result-icon {
    font-size: 80px;
    animation: bounce-in 0.6s ease-out;
}

@keyframes bounce-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.duel-result-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0;
}

.duel-result-title.win {
    color: #00ff88;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.duel-result-title.lose {
    color: #ff4444;
    text-shadow: 0 0 30px rgba(255, 68, 68, 0.6);
}

.duel-result-title.draw {
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.duel-final-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-radius: 16px;
    margin: 10px 0;
}

.duel-final-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.duel-final-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.duel-final-score {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
}

.duel-final-vs {
    font-size: 28px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
}

.duel-result-message {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 10px 0 20px 0;
}

/* === INFO MODAL STYLES === */

.info-card {
    max-height: 85vh;
    overflow-y: auto;
}

.info-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.info-icon {
    font-size: 40px;
    animation: float 3s ease-in-out infinite;
}

.info-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-shadow: none;
}

.info-content {
    text-align: left;
    margin-bottom: 20px;
}

.info-block {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border-left: 3px solid #00ff88;
}

.info-block h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.info-block p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}

.info-card .btn-white {
    margin-top: 10px;
}

/* === DUEL TYPE MODAL === */

.duel-type-card {
    background: #2b2b2b;
    border-radius: 16px;
    padding: 24px 20px 20px;
    width: 90%;
    max-width: 300px;
    position: relative;
    animation: popIn 0.3s ease-out;
}

.duel-type-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.duel-type-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

.duel-type-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 20px 0;
}

.duel-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: #3a3a3a;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.duel-type-option:last-child {
    margin-bottom: 0;
}

.duel-type-option:hover {
    background: #4a4a4a;
}

.duel-type-option:active {
    transform: scale(0.98);
    background: #505050;
}

.duel-type-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.duel-type-text {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

/* === COUNTDOWN OVERLAY === */

.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.countdown-number {
    font-size: 180px;
    font-weight: 900;
    color: #fff;
    text-shadow:
        0 0 40px rgba(255, 215, 0, 0.8),
        0 0 80px rgba(255, 136, 0, 0.6),
        0 0 120px rgba(255, 85, 0, 0.4);
    animation: countdown-pulse 1s ease-out;
}

@keyframes countdown-pulse {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.countdown-number.go {
    font-size: 100px;
    color: #00ff88;
    text-shadow:
        0 0 40px rgba(0, 255, 136, 0.8),
        0 0 80px rgba(0, 255, 136, 0.6);
}

/* === DUEL HUD (Split-screen during test) === */

.duel-hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 8px;
    z-index: 150;
    pointer-events: none;
    gap: 5px;
}

.duel-hud-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    min-width: 110px;
    flex: 1;
    max-width: 140px;
}

.duel-hud-player.left {
    border: 2px solid rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.duel-hud-player.right {
    border: 2px solid rgba(255, 136, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.2);
}

.duel-hud-avatar {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

.duel-hud-model {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.duel-hud-stats {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.duel-hud-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.duel-hud-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.duel-hud-value {
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.duel-hud-player.left .duel-hud-value {
    color: #00ff88;
}

.duel-hud-player.right .duel-hud-value {
    color: #ff8800;
}

.duel-hud-vs {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    padding: 20px 8px;
    align-self: center;
}

.duel-fps-graph {
    width: 100%;
    height: 35px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
}

/* Hide regular HUD during duel */
.duel-active #hud {
    display: none !important;
}

/* === DUEL FINISH BADGE === */

.duel-hud-finish-badge {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    z-index: 10;
    animation: badge-pop 0.4s ease-out;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

@keyframes badge-pop {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translateX(-50%) scale(1.3);
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* Состояние "завершил" - плашка опускается и становится приглушённой */
.duel-hud-player.finished {
    margin-top: 25px;
    opacity: 0.7;
    transition: all 0.4s ease-out;
}

.duel-hud-player.finished .duel-hud-value {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Сохраняем позиционирование для badge */
.duel-hud-player {
    position: relative;
    transition: margin-top 0.4s ease-out, opacity 0.4s ease-out;
}

/* === ADMIN DUEL PANEL === */

.admin-duel-card {
    position: relative;
    background: linear-gradient(145deg, rgba(40, 44, 52, 0.95), rgba(20, 20, 20, 0.98));
    border: 1px solid rgba(255, 136, 0, 0.3);
    border-radius: 24px;
    padding: 30px 25px;
    width: 90%;
    max-width: 340px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 136, 0, 0.15);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.admin-duel-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    line-height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-duel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.admin-duel-title {
    font-size: 22px;
    font-weight: 800;
    color: #ff8800;
    margin: 0 0 25px 0;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 136, 0, 0.4);
}

.admin-duel-section {
    margin-bottom: 15px;
}

.admin-duel-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.admin-duel-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.admin-duel-select:focus {
    border-color: #ff8800;
    background-color: rgba(255, 255, 255, 0.15);
}

.admin-duel-select option {
    background: #1a2f3d;
    color: #fff;
    padding: 10px;
}

.admin-duel-score {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    text-align: center;
}

.admin-duel-vs {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    margin: 15px 0;
}

.admin-duel-start {
    width: 100%;
    margin-top: 20px;
}

/* === ПРОСТОЙ ЭКРАН РЕЗУЛЬТАТА ДУЭЛИ === */
.duel-simple-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 20px 0;
}

.duel-simple-score-value {
    font-size: 72px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    line-height: 1;
}

.duel-simple-score-label {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* === ADMIN PANEL BUTTONS === */
.admin-duel-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-admin-save {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(180deg, #43e97b 0%, #38f9d7 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.btn-admin-reset {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 68, 68, 0.8);
    border: none;
    border-radius: 12px;
    cursor: pointer;
}