* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #0f0f23 100%);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    color: white;
}

#game-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ========== HUD TOP ========== */
#hud-top {
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(20,20,40,0.8) 100%);
    padding: 12px 30px;
    border-bottom: 2px solid #e94560;
    box-shadow: 0 4px 20px rgba(233,69,96,0.3);
}

.score-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.player-info, .opponent-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-info .name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #4ecca3;
    text-shadow: 0 0 10px rgba(78,204,163,0.5);
    letter-spacing: 1px;
}

.opponent-info .name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #e94560;
    text-shadow: 0 0 10px rgba(233,69,96,0.5);
    letter-spacing: 1px;
}

.score {
    font-size: 2.2rem;
    font-weight: 900;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    padding: 8px 25px;
    border-radius: 12px;
    min-width: 100px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.timer-section {
    text-align: center;
}

#round-timer {
    font-size: 3rem;
    font-weight: 900;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.3);
    letter-spacing: 3px;
}

#round-number {
    display: block;
    font-size: 1rem;
    color: #888;
    margin-top: 4px;
    font-weight: 600;
    letter-spacing: 2px;
}

.bar-text {
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    width: 60px;
    text-align: center;
}
#hud-bars {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(10,10,20,0.5) 100%);
    gap: 30px;
}

.player-bars, .opponent-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opponent-bars {
    align-items: flex-end;
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.opponent-bars .bar-container {
    flex-direction: row-reverse;
}

.bar-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: #aaa;
    min-width: 30px;
    letter-spacing: 1px;
}

.bar {
    width: 280px;
    height: 24px;
    background: rgba(0,0,0,0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}

.bar-fill {
    height: 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    border-radius: 10px;
    position: relative;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    border-radius: 10px 10px 0 0;
}

.hp-fill {
    background: linear-gradient(90deg, #ff4757 0%, #ff3838 50%, #ff2e63 100%);
    box-shadow: 0 0 15px rgba(255,71,87,0.5);
}

.hp-fill.opponent {
    background: linear-gradient(90deg, #3742fa 0%, #2f3542 50%, #5352ed 100%);
    box-shadow: 0 0 15px rgba(55,66,250,0.5);
}

.hp-fill.low {
    background: linear-gradient(90deg, #ff0000 0%, #cc0000 100%);
    animation: hpPulse 1s ease infinite;
}

@keyframes hpPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255,0,0,0.5); }
    50% { box-shadow: 0 0 25px rgba(255,0,0,0.8); }
}

.stamina-fill {
    background: linear-gradient(90deg, #2ed573 0%, #7bed9f 100%);
    box-shadow: 0 0 10px rgba(46,213,115,0.5);
}

.energy-fill.opponent {
    background: linear-gradient(90deg, #a55eea 0%, #8b5cf6 50%, #7c3aed 100%);
    box-shadow: 0 0 15px rgba(165,94,234,0.5);
}

.stamina-indicator {
    text-align: center;
    padding: 0 30px;
}

#stamina-text {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 1px;
}

#stamina-bar {
    width: 120px;
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

#stamina-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #2ed573 0%, #7bed9f 50%, #2ed573 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(46,213,115,0.4);
}

/* ========== RING VIEW ========== */
#ring-view {
    flex: 1 0 400px;
    position: relative;
    perspective: 1200px;
    transform-style: preserve-3d;
    overflow: hidden;
    background: 
        /* Wooden floor */
        linear-gradient(180deg, transparent 65%, #c19a6b 65%, #a07855 100%),
        /* Wall details (lines for planks) */
        repeating-linear-gradient(90deg, rgba(0,0,0,0.03) 0px, rgba(0,0,0,0.03) 2px, transparent 2px, transparent 60px),
        /* Wall base color */
        linear-gradient(180deg, #f0e6d2 0%, #dccbb5 65%);
}

/* กรงมวย - ปรับให้ดูสมจริงขึ้น */
#ring-ropes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.rope {
    position: absolute;
    left: 3%;
    right: 3%;
    height: 6px;
    background: 
        linear-gradient(90deg, 
            transparent 0%,
            #c0392b 5%,
            #e74c3c 15%,
            #ff6b6b 50%,
            #e74c3c 85%,
            #c0392b 95%,
            transparent 100%
        );
    box-shadow: 
        0 0 15px rgba(231,76,60,0.6),
        0 4px 8px rgba(0,0,0,0.3);
    border-radius: 3px;
}

.rope::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%);
}

.rope-top { top: 15%; }
.rope-mid { top: 35%; }
.rope-bottom { top: 55%; }

/* คู่ต่อสู้ - ปรับให้ดูดีขึ้น */
#opponent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 280px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    z-index: 10;
}

#opponent-body {
    position: relative;
    width: 100%;
    height: 100%;
}

/* หัวคู่ต่อสู้ */
#opponent-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 75px;
    background: 
        radial-gradient(ellipse at 30% 20%, #a05a2c 0%, #85441d 40%, #632d0f 100%);
    border-radius: 50% 50% 45% 45%;
    border: 3px solid #4a2009;
    cursor: crosshair;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.3),
        inset 0 -5px 15px rgba(0,0,0,0.1);
}

#opponent-head::before {
    content: '😠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

#opponent-head.hit {
    animation: headShake 0.4s cubic-bezier(0.36, 0, 0.66, -0.56) both;
    background: 
        radial-gradient(ellipse at 30% 20%, #ff6b6b 0%, #ee5a5a 40%, #cc4444 100%);
}

/* ลำตัวคู่ต่อสู้ */
#opponent-torso {
    position: absolute;
    top: 78px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 140px;
    background: 
        linear-gradient(180deg, #a05a2c 0%, #85441d 55%, #27ae60 55%, #2ecc71 100%);
    border-radius: 25px 25px 10px 10px;
    border: 3px solid #4a2009;
    cursor: crosshair;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.4),
        inset 0 5px 15px rgba(255,255,255,0.1);
}

/* กล้ามหน้าท้อง */
#opponent-torso::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 30%;
    right: 30%;
    height: 30%;
    background: transparent;
    border: 2px solid rgba(0,0,0,0.15);
    border-top: none;
    border-bottom: none;
    border-radius: 10px;
}

/* เข็มขัด */
#opponent-torso::after {
    content: '';
    position: absolute;
    top: 52%;
    left: -5px;
    right: -5px;
    height: 18px;
    background: linear-gradient(90deg, #b87333 0%, #d35400 50%, #b87333 100%);
    border: 2px solid #873600;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

#opponent-torso.hit {
    animation: bodyShake 0.4s cubic-bezier(0.36, 0, 0.66, -0.56) both;
    background: 
        linear-gradient(180deg, #ff6b6b 0%, #ee5a5a 50%, #cc4444 100%);
}

/* นวมคู่ต่อสู้ */
#opponent-gloves {
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    height: 90px;
}

.glove {
    position: absolute;
    width: 60px;
    height: 60px;
    background: 
        radial-gradient(circle at 30% 30%, #ff4757 0%, #e84118 50%, #c23616 100%);
    border-radius: 50%;
    border: 3px solid #8c2510;
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.5),
        inset 0 -5px 10px rgba(0,0,0,0.3),
        inset 0 5px 15px rgba(255,255,255,0.2);
    transition: all 0.2s ease;
    transform-style: preserve-3d;
}

.glove .arm {
    position: absolute;
    top: 30px;
    left: 15px;
    width: 28px;
    height: 60px;
    background: linear-gradient(180deg, #85441d, #5a2e0c);
    z-index: -1;
    border: 3px solid #4a2009;
    border-radius: 15px;
}

.glove::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
    border-radius: 50%;
}

/* Wristband for opponent */
.glove::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 25px;
    background: linear-gradient(180deg, #353b48 0%, #2f3640 100%);
    border-radius: 12px;
    border: 2px solid #1e272e;
}

#opponent-left-glove {
    left: -15px;
    animation: guardLeft 2.5s ease-in-out infinite;
}

#opponent-left-glove .arm {
    transform-origin: top center;
    transform: translateZ(-10px) rotate(-20deg);
}

#opponent-right-glove {
    right: -15px;
    animation: guardRight 2.5s ease-in-out infinite;
}

#opponent-right-glove .arm {
    transform-origin: top center;
    transform: translateZ(-10px) rotate(20deg);
}

#opponent.blocking #opponent-left-glove {
    left: 15px;
    animation: blockLeft 0.4s ease forwards;
}

#opponent.blocking #opponent-right-glove {
    right: 15px;
    animation: blockRight 0.4s ease forwards;
}

/* K.O. Animation */
#opponent.knockout {
    animation: knockoutFall 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#opponent.knockout #opponent-head {
    animation: knockoutHead 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#opponent.knockout #opponent-torso {
    animation: knockoutTorso 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* มือและนวมผู้เล่น - ปรับให้ดูสมจริง */
#player-gloves {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 140px;
    pointer-events: none;
    transform-style: preserve-3d;
    z-index: 30; /* ปรับเลเยอร์ให้สูงขึ้น */
}

.player-glove {
    position: absolute;
    bottom: 0;
    width: 90px;
    height: 90px;
    background: 
        radial-gradient(circle at 25% 25%, #ff6b6b 0%, #e74c3c 40%, #c0392b 100%);
    border-radius: 50%;
    border: 4px solid #922b21;
    box-shadow: 
        0 15px 40px rgba(0,0,0,0.5),
        inset 0 -8px 15px rgba(0,0,0,0.3),
        inset 0 8px 15px rgba(255,255,255,0.1);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-glove::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.player-arm {
    position: absolute;
    top: 50px;
    left: 5px;
    width: 75px;
    height: 250px;
    background: linear-gradient(180deg, #d2b48c 0%, #8b4513 100%);
    border: 4px solid #5a2e0c;
    border-radius: 35px;
    z-index: -2;
}

.player-glove::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 35px;
    background: linear-gradient(180deg, #f5f6fa 0%, #dcdde1 100%);
    border-radius: 15px;
    border: 3px solid #7f8fa6;
}

#left-glove {
    left: 30px;
}

#left-glove .player-arm {
    transform-origin: top center;
    transform: rotate(15deg);
}

#right-glove {
    right: 30px;
}

#right-glove .player-arm {
    transform-origin: top center;
    transform: rotate(-15deg);
}

#left-glove.blocking {
    transform: translateY(-40px) translateX(40px) rotate(-15deg);
}

#right-glove.blocking {
    transform: translateY(-40px) translateX(-40px) rotate(15deg);
}

/* ========== EFFECTS ========== */
.effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.hit-effect {
    position: absolute;
    font-size: 3.5rem;
    font-weight: 900;
    font-style: italic;
    color: #7bed9f; /* Bright green like the image */
    text-transform: uppercase;
    text-shadow: 
        -3px -3px 0 #000,
         3px -3px 0 #000,
        -3px  3px 0 #000,
         3px  3px 0 #000,
         6px  6px 0 #000,
         0 0 20px #2ed573,
         0 0 40px #2ed573;
    animation: hitPopupArcade 0.6s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

.hit-spark {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #fff 0%, #ffdd59 20%, #ff4757 60%, transparent 80%);
    border-radius: 50%;
    transform: scale(0) translate(-50%, -50%);
    transform-origin: 0 0;
    animation: sparkAnim 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
    z-index: 40;
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes sparkAnim {
    0% { transform: scale(0) translate(-50%, -50%) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.5) translate(-50%, -50%) rotate(45deg); opacity: 0.8; }
    100% { transform: scale(2.5) translate(-50%, -50%) rotate(90deg); opacity: 0; }
}

.block-effect {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 800;
    color: #3742fa;
    text-shadow: 
        0 0 10px #3742fa,
        0 0 20px #3742fa;
    animation: blockPopup 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 10;
}

.dodge-effect {
    position: absolute;
    font-size: 2rem;
    font-weight: 700;
    color: #2ed573;
    text-shadow: 
        0 0 10px #2ed573,
        0 0 20px #2ed573;
    animation: dodgePopup 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 10;
}

/* ========== FIGHT STATUS ========== */
#fight-status {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 20;
}

#combo-counter {
    font-size: 2rem;
    font-weight: 900;
    color: #ffa502;
    text-shadow: 
        0 0 10px rgba(255,165,2,0.8),
        0 0 20px rgba(255,165,2,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    letter-spacing: 2px;
}

#combo-counter.active {
    opacity: 1;
    animation: comboPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#damage-popup {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
}

.damage-text {
    font-size: 2.5rem;
    font-weight: 900;
    animation: damageFloat 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.damage-text.critical {
    color: #ff4757;
    font-size: 4rem;
    text-shadow: 
        0 0 10px #ff4757,
        0 0 20px #ff4757,
        0 0 40px #ff4757;
}

.damage-text.normal {
    color: #ffa502;
}

/* ========== CONTROLS ========== */
#controls {
    background: linear-gradient(0deg, rgba(0,0,0,0.98) 0%, rgba(15,15,30,0.9) 100%);
    padding: 15px 30px;
    border-top: 2px solid #e94560;
    box-shadow: 0 -4px 20px rgba(233,69,96,0.2);
}

.control-group {
    margin-bottom: 12px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-title {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 18px;
    background: linear-gradient(180deg, #2d3436 0%, #1e272e 100%);
    border: 2px solid #3d3d3d;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 110px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.action-btn:hover {
    background: linear-gradient(180deg, #3d3d3d 0%, #2d2d2d 100%);
    border-color: #4d4d4d;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.action-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn .key {
    font-size: 0.75rem;
    background: rgba(0,0,0,0.4);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 800;
    color: #ffa502;
    border: 1px solid rgba(255,165,2,0.3);
}

.action-btn .name {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.action-btn .cost {
    font-size: 0.7rem;
    color: #ffa502;
    margin-top: 4px;
    font-weight: 600;
}

.action-btn.defense {
    background: linear-gradient(180deg, #218c74 0%, #1e6f5c 100%);
    border-color: #2ecc71;
}

.action-btn.defense:hover {
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
    border-color: #58d68d;
    box-shadow: 0 8px 20px rgba(46,204,113,0.3);
}

.action-btn.ultimate {
    background: linear-gradient(180deg, #8e44ad 0%, #6c3483 100%);
    border-color: #9b59b6;
    min-width: 160px;
}

.action-btn.ultimate:hover:not(:disabled) {
    background: linear-gradient(180deg, #9b59b6 0%, #8e44ad 100%);
    border-color: #af7ac5;
    box-shadow: 0 0 30px rgba(155,89,182,0.5);
}

.action-btn.ultimate:disabled {
    background: linear-gradient(180deg, #444 0%, #333 100%);
    border-color: #555;
}

.action-btn.ultimate.ready {
    animation: ultimatePulse 1.5s ease infinite;
    border-color: #ffd700;
}

@keyframes ultimatePulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(155,89,182,0.5);
        border-color: #9b59b6;
    }
    50% { 
        box-shadow: 0 0 40px rgba(255,215,0,0.6);
        border-color: #ffd700;
    }
}

#ultimate-charge {
    width: 160px;
    height: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

#ultimate-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #9b59b6 0%, #e74c3c 50%, #ffa502 100%);
    border-radius: 5px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(155,89,182,0.5);
    position: relative;
}

#ultimate-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

/* ========== STATUS OVERLAY ========== */
#status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

#status-overlay.hidden {
    display: none;
}

#status-text {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 10px;
    animation: statusPulse 1s ease infinite;
}

#status-text.knockout {
    color: #ff4757;
    text-shadow: 
        0 0 20px #ff4757,
        0 0 40px #ff4757,
        0 0 80px #ff4757;
}

#status-text.dizzy {
    color: #ffa502;
    text-shadow: 
        0 0 20px #ffa502,
        0 0 40px #ffa502;
}

/* ========== GAME OVER ========== */
#game-over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(10px);
}

#game-over.hidden {
    display: none;
}

.result-container {
    text-align: center;
    padding: 50px 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 25px;
    border: 3px solid #e94560;
    box-shadow: 
        0 0 60px rgba(233,69,96,0.3),
        0 20px 60px rgba(0,0,0,0.5);
    max-width: 500px;
}

#result-title {
    font-size: 3.5rem;
    margin-bottom: 25px;
    font-weight: 900;
    letter-spacing: 3px;
}

#result-title.win {
    color: #4ecca3;
    text-shadow: 0 0 30px #4ecca3;
}

#result-title.lose {
    color: #e94560;
    text-shadow: 0 0 30px #e94560;
}

#result-title.draw {
    color: #ffa502;
    text-shadow: 0 0 30px #ffa502;
}

#result-desc {
    font-size: 1.3rem;
    color: #aaa;
    margin-bottom: 35px;
    line-height: 1.6;
}

.restart-btn {
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(180deg, #e94560 0%, #c0392b 100%);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(233,69,96,0.4);
}

.restart-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 40px rgba(233,69,96,0.6);
}

/* ========== TUTORIAL - แบบปุ่ม Popup ========== */
#tutorial-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4ecca3 0%, #27ae60 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(78,204,163,0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tutorial-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 35px rgba(78,204,163,0.6);
}

#tutorial-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#tutorial-popup.active {
    opacity: 1;
    visibility: visible;
}

.tutorial-content {
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 25px;
    border: 2px solid #4ecca3;
    box-shadow: 0 0 60px rgba(78,204,163,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#tutorial-popup.active .tutorial-content {
    transform: scale(1);
}

.tutorial-content h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 35px;
    color: #4ecca3;
    text-shadow: 0 0 20px rgba(78,204,163,0.5);
}

.tutorial-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 35px;
}

.section {
    background: rgba(255,255,255,0.03);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.section h3 {
    color: #e94560;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 1px;
}

.section ul {
    list-style: none;
}

.section li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
    line-height: 1.5;
}

.section li:last-child {
    border-bottom: none;
}

kbd {
    background: linear-gradient(180deg, #3d3d3d 0%, #2d2d2d 100%);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 800;
    color: #ffa502;
    border: 1px solid rgba(255,165,2,0.3);
    font-size: 0.85rem;
}

.tutorial-close {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(180deg, #4ecca3 0%, #27ae60 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.tutorial-close:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(78,204,163,0.5);
}

/* หน้าเริ่มต้น - แบบเรียบง่าย */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #0f0f23 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

#start-screen.hidden {
    display: none;
}

.start-title {
    font-size: 4rem;
    font-weight: 900;
    color: #e94560;
    text-shadow: 
        0 0 20px rgba(233,69,96,0.5),
        0 0 40px rgba(233,69,96,0.3);
    margin-bottom: 20px;
    letter-spacing: 5px;
}

.start-subtitle {
    font-size: 1.3rem;
    color: #888;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.start-btn {
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(180deg, #e94560 0%, #c0392b 100%);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 2px;
    box-shadow: 0 15px 40px rgba(233,69,96,0.4);
}

.start-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 50px rgba(233,69,96,0.6);
}

/* ========== ANIMATIONS ========== */
/* PLAYER PUNCHES - 3D ENHANCED */
@keyframes playerJabLeft {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    15% { transform: translateZ(40px) translateY(10px) translateX(-15px) scale(0.95) rotateX(20deg) rotateY(-15deg) rotateZ(-5deg); }
    40% { transform: translateZ(-400px) translateY(-140px) translateX(50px) scale(0.5) rotateX(-30deg) rotateY(40deg) rotateZ(15deg); }
    60% { transform: translateZ(-400px) translateY(-140px) translateX(50px) scale(0.5) rotateX(-30deg) rotateY(40deg) rotateZ(15deg); }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}

@keyframes playerJabRight {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    15% { transform: translateZ(40px) translateY(10px) translateX(15px) scale(0.95) rotateX(20deg) rotateY(15deg) rotateZ(5deg); }
    40% { transform: translateZ(-400px) translateY(-140px) translateX(-50px) scale(0.5) rotateX(-30deg) rotateY(-40deg) rotateZ(-15deg); }
    60% { transform: translateZ(-400px) translateY(-140px) translateX(-50px) scale(0.5) rotateX(-30deg) rotateY(-40deg) rotateZ(-15deg); }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}

@keyframes playerStraightRight {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    20% { transform: translateZ(50px) translateY(15px) translateX(20px) scale(0.95) rotateX(25deg) rotateY(15deg) rotateZ(10deg); }
    45% { transform: translateZ(-450px) translateY(-120px) translateX(-40px) scale(0.4) rotateX(-40deg) rotateY(-45deg) rotateZ(-20deg); }
    65% { transform: translateZ(-450px) translateY(-120px) translateX(-40px) scale(0.4) rotateX(-40deg) rotateY(-45deg) rotateZ(-20deg); }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}

@keyframes playerStraightLeft {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    20% { transform: translateZ(50px) translateY(15px) translateX(-20px) scale(0.95) rotateX(25deg) rotateY(-15deg) rotateZ(-10deg); }
    45% { transform: translateZ(-450px) translateY(-120px) translateX(40px) scale(0.4) rotateX(-40deg) rotateY(45deg) rotateZ(20deg); }
    65% { transform: translateZ(-450px) translateY(-120px) translateX(40px) scale(0.4) rotateX(-40deg) rotateY(45deg) rotateZ(20deg); }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}

@keyframes playerHookLeft {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    20% { transform: translateZ(30px) translateY(20px) translateX(-80px) scale(0.95) rotateX(10deg) rotateY(-60deg) rotateZ(-30deg); }
    50% { transform: translateZ(-250px) translateY(-90px) translateX(120px) scale(0.6) rotateX(10deg) rotateY(80deg) rotateZ(45deg); }
    70% { transform: translateZ(-250px) translateY(-90px) translateX(120px) scale(0.6) rotateX(10deg) rotateY(80deg) rotateZ(45deg); }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}

@keyframes playerHookRight {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    20% { transform: translateZ(30px) translateY(20px) translateX(80px) scale(0.95) rotateX(10deg) rotateY(60deg) rotateZ(30deg); }
    50% { transform: translateZ(-250px) translateY(-90px) translateX(-120px) scale(0.6) rotateX(10deg) rotateY(-80deg) rotateZ(-45deg); }
    70% { transform: translateZ(-250px) translateY(-90px) translateX(-120px) scale(0.6) rotateX(10deg) rotateY(-80deg) rotateZ(-45deg); }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}

@keyframes playerUppercutRight {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    20% { transform: translateZ(80px) translateY(250px) translateX(60px) scale(1.1) rotateX(-70deg) rotateY(30deg) rotateZ(45deg); }
    50% { transform: translateZ(-300px) translateY(-300px) translateX(-30px) scale(0.6) rotateX(80deg) rotateY(-20deg) rotateZ(-30deg); }
    70% { transform: translateZ(-300px) translateY(-300px) translateX(-30px) scale(0.6) rotateX(80deg) rotateY(-20deg) rotateZ(-30deg); }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}

@keyframes playerUppercutLeft {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    20% { transform: translateZ(80px) translateY(250px) translateX(-60px) scale(1.1) rotateX(-70deg) rotateY(-30deg) rotateZ(-45deg); }
    50% { transform: translateZ(-300px) translateY(-300px) translateX(30px) scale(0.6) rotateX(80deg) rotateY(20deg) rotateZ(30deg); }
    70% { transform: translateZ(-300px) translateY(-300px) translateX(30px) scale(0.6) rotateX(80deg) rotateY(20deg) rotateZ(30deg); }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}

/* CPU PUNCHES - 3D ENHANCED */
@keyframes cpuJab {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); z-index: 1; }
    20% { transform: translateZ(-60px) translateY(-15px) translateX(-15px) scale(0.85) rotateX(-10deg) rotateY(15deg) rotateZ(10deg); z-index: 100; }
    45% { transform: translateZ(450px) translateY(100px) translateX(50px) scale(4.5) rotateX(30deg) rotateY(-20deg) rotateZ(-15deg); z-index: 100; }
    60% { transform: translateZ(450px) translateY(100px) translateX(50px) scale(4.5) rotateX(30deg) rotateY(-20deg) rotateZ(-15deg); z-index: 100; }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); z-index: 1; }
}

@keyframes cpuStraight {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); z-index: 1; }
    25% { transform: translateZ(-80px) translateY(-20px) translateX(25px) scale(0.8) rotateX(-15deg) rotateY(-20deg) rotateZ(-15deg); z-index: 100; }
    50% { transform: translateZ(550px) translateY(80px) translateX(-60px) scale(5.5) rotateX(40deg) rotateY(30deg) rotateZ(20deg); z-index: 100; }
    65% { transform: translateZ(550px) translateY(80px) translateX(-60px) scale(5.5) rotateX(40deg) rotateY(30deg) rotateZ(20deg); z-index: 100; }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); z-index: 1; }
}

@keyframes cpuHook {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); z-index: 1; }
    25% { transform: translateZ(-100px) translateY(30px) translateX(-150px) scale(0.85) rotateX(20deg) rotateY(60deg) rotateZ(45deg); z-index: 100; }
    50% { transform: translateZ(400px) translateY(50px) translateX(150px) scale(4) rotateX(-20deg) rotateY(-70deg) rotateZ(-30deg); z-index: 100; }
    65% { transform: translateZ(400px) translateY(50px) translateX(150px) scale(4) rotateX(-20deg) rotateY(-70deg) rotateZ(-30deg); z-index: 100; }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); z-index: 1; }
}

@keyframes cpuUppercut {
    0% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); z-index: 1; }
    30% { transform: translateZ(-120px) translateY(200px) translateX(30px) scale(0.7) rotateX(50deg) rotateY(-20deg) rotateZ(-30deg); z-index: 100; }
    60% { transform: translateZ(500px) translateY(-150px) translateX(-30px) scale(5) rotateX(-60deg) rotateY(25deg) rotateZ(35deg); z-index: 100; }
    75% { transform: translateZ(500px) translateY(-150px) translateX(-30px) scale(5) rotateX(-60deg) rotateY(25deg) rotateZ(35deg); z-index: 100; }
    100% { transform: translateZ(0) translateY(0) translateX(0) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg); z-index: 1; }
}

@keyframes headShake {
    0%, 100% { transform: translateX(-50%) rotate(0deg) scale(1); }
    20% { transform: translateX(-50%) rotate(-20deg) scale(1.05); }
    40% { transform: translateX(-50%) rotate(15deg) scale(0.95); }
    60% { transform: translateX(-50%) rotate(-10deg) scale(1.02); }
    80% { transform: translateX(-50%) rotate(5deg) scale(0.98); }
}

@keyframes bodyShake {
    0%, 100% { transform: translateX(-50%) scale(1); }
    25% { transform: translateX(-50%) scale(0.92) translateY(5px); }
    50% { transform: translateX(-50%) scale(0.95) translateY(-3px); }
    75% { transform: translateX(-50%) scale(0.98) translateY(2px); }
}

@keyframes guardLeft {
    0%, 100% { transform: translateY(0) rotate(0deg) translateX(0); }
    25% { transform: translateY(-8px) rotate(-8deg) translateX(5px); }
    75% { transform: translateY(-5px) rotate(5deg) translateX(-3px); }
}

@keyframes guardRight {
    0%, 100% { transform: translateY(0) rotate(0deg) translateX(0); }
    25% { transform: translateY(-8px) rotate(8deg) translateX(-5px); }
    75% { transform: translateY(-5px) rotate(-5deg) translateX(3px); }
}

@keyframes blockLeft {
    0% { transform: translateX(0) rotate(0deg); }
    100% { transform: translateX(35px) rotate(-20deg); }
}

@keyframes blockRight {
    0% { transform: translateX(0) rotate(0deg); }
    100% { transform: translateX(-35px) rotate(20deg); }
}

@keyframes knockoutFall {
    0% { transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); filter: brightness(1); }
    20% { transform: translate(-50%, -50%) rotateX(15deg) rotateY(10deg) rotateZ(-5deg) scale(1.05) translateZ(-50px); filter: brightness(1.2); }
    50% { transform: translate(-50%, -30%) rotateX(50deg) rotateY(25deg) rotateZ(-15deg) scale(0.9) translateZ(-250px); }
    100% { transform: translate(-50%, 40%) rotateX(85deg) rotateY(40deg) rotateZ(-25deg) scale(0.75) translateZ(-500px); filter: brightness(0.5); }
}

@keyframes knockoutHead {
    0% { transform: translateX(-50%) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    50% { transform: translateX(-50%) rotateX(-30deg) rotateY(-40deg) rotateZ(-10deg) translateY(-10px) translateZ(40px); }
    100% { transform: translateX(-50%) rotateX(-55deg) rotateY(-60deg) rotateZ(-20deg) translateY(15px) translateZ(80px); }
}

@keyframes knockoutTorso {
    0% { transform: translateX(-50%) scale(1) rotateX(0deg); }
    100% { transform: translateX(-50%) scale(0.9) rotateX(-15deg) translateY(30px) translateZ(-30px); }
}

@keyframes hitPopupArcade {
    0% { opacity: 0; transform: scale(0.3) rotate(-15deg); }
    40% { opacity: 1; transform: scale(1.3) rotate(5deg); }
    70% { opacity: 1; transform: scale(1.1) rotate(10deg); filter: blur(0px); }
    100% { opacity: 0; transform: scale(1.5) rotate(15deg); filter: blur(4px); }
}

@keyframes blockPopup {
    0% { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(5deg); }
    100% { opacity: 0; transform: scale(1.5) rotate(0deg); }
}

@keyframes dodgePopup {
    0% { opacity: 0; transform: translateX(0) scale(0.8); }
    50% { opacity: 1; transform: translateX(40px) scale(1.1); }
    100% { opacity: 0; transform: translateX(80px) scale(1); }
}

@keyframes comboPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes damageFloat {
    0% { opacity: 1; transform: translateY(0) scale(0.8); }
    20% { transform: translateY(-20px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-120px) scale(1.5); }
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-15px); }
    30% { transform: translateX(15px); }
    50% { transform: translateX(-10px); }
    70% { transform: translateX(10px); }
    90% { transform: translateX(-5px); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .bar {
        width: 220px;
    }
    
    .tutorial-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .bar {
        width: 160px;
    }
    
    #opponent {
        width: 140px;
        height: 260px;
    }
    
    #opponent-head {
        width: 50px;
        height: 60px;
    }
    
    #opponent-torso {
        width: 80px;
        height: 110px;
    }
    
    .glove {
        width: 45px;
        height: 45px;
    }
    
    .glove .arm {
        width: 22px;
        height: 45px;
        top: 20px;
        left: 10px;
    }
    
    .player-glove {
        width: 70px;
        height: 70px;
    }
    
    .player-arm {
        width: 60px;
        height: 180px;
        top: 45px;
        left: 3px;
    }
    
    #player-gloves {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .buttons {
        justify-content: center;
    }
    
    .action-btn {
        min-width: 90px;
        padding: 10px 12px;
    }
    
    .action-btn .name {
        font-size: 0.8rem;
    }
    
    #hud-top {
        padding: 8px 15px;
    }
    
    .score {
        font-size: 1.6rem;
        padding: 5px 15px;
        min-width: 70px;
    }
    
    #round-timer {
        font-size: 2rem;
    }
    
    .bar {
        width: 120px;
        height: 18px;
    }
    
    #hud-bars {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .player-glove {
        width: 60px;
        height: 60px;
    }
    
    .player-arm {
        width: 48px;
        height: 150px;
        top: 40px;
    }
    
    #player-gloves {
        width: 220px;
        bottom: 220px; /* Lift to not overlap with mobile controls */
    }
    
    .start-title {
        font-size: 2.5rem;
    }
    
    .tutorial-content {
        padding: 25px;
    }
    
    .tutorial-content h2 {
        font-size: 1.8rem;
    }
}

/* ========== DIFFICULTY SELECT ========== */
.difficulty-select {
    margin: 20px 0;
    font-family: 'Press Start 2P', cursive;
    color: white;
}
.difficulty-select label {
    margin-right: 10px;
    font-size: 0.8rem;
}
.difficulty-select select {
    background: rgba(0, 0, 0, 0.7);
    color: #ffd700;
    border: 2px solid #ffd700;
    padding: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

/* ========== MOBILE CONTROLS ========== */
#mobile-controls {
    display: none;
    position: absolute;
    bottom: max(40px, env(safe-area-inset-bottom));
    left: 0;
    width: 100%;
    height: 250px;
    z-index: 100;
    pointer-events: none; /* Let clicks pass through empty areas */
}

.mobile-pad {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

.left-pad {
    left: 10px;
    width: 120px;
}

.right-pad {
    right: 10px;
    width: 160px;
    align-items: flex-end;
}

.m-btn-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.m-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    text-shadow: 1px 1px 2px black;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-tap-highlight-color: transparent;
}

.m-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.4);
}

.attack-btn {
    width: 60px;
    height: 60px;
    border-color: rgba(231, 76, 60, 0.5);
}

.dodge-btn {
    width: 70px;
    height: 50px;
    border-radius: 25px;
    border-color: rgba(52, 152, 219, 0.5);
}

.block-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border-color: rgba(46, 204, 113, 0.5);
    margin: 0 auto;
}

.m-ultimate-btn {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    border-color: rgba(241, 196, 15, 0.5);
    color: #f1c40f;
}

.m-ultimate-btn:not([disabled]) {
    background: rgba(241, 196, 15, 0.5);
    border-color: #f1c40f;
    animation: comboPulse 1s infinite;
}

@media (max-width: 768px) {
    #controls {
        display: none !important;
    }
    #mobile-controls {
        display: block;
    }
    #tutorial-btn {
        display: none !important;
    }
}
