@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --bg-color: #121212;
    --surface-color: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-color: #6c5ce7;
    --accent-color: #a29bfe;
    --health-color: #ff7675;
    --mana-color: #74b9ff;
    --attack-color: #ffeaa7;
    --text-color: #ffffff;
    --font-main: 'VT323', monospace;
    --card-width: 75px;
    --card-height: 105px;
}

/* Ensure mute button is always clickable and visible */
.mute-btn {
    pointer-events: auto !important;
    z-index: 10000 !important;
    cursor: pointer;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background: url('assets/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-app {
    width: 100%;
    max-width: 1000px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    /* Background removed from here */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
    /* Ensure content is readable */
    overflow: hidden;
}

#game-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    /* Overlay for better text readability */
    pointer-events: none;
    z-index: 0;
}

/* Ensure children are above the overlay */
#game-app>* {
    z-index: 1;
}


/* Common Zones */
.player-zone {
    flex: 0 0 160px;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
}

.user-zone {
    border-bottom: none;
    border-top: none;

    background: transparent;
    /* Remove "bar" look */
    box-shadow: none;
    flex-basis: 130px;
    /* Reduced from 160 */
    padding-bottom: 0;
    /* Remove potential bottom padding waste */
}

/* Speech Bubble - Global */
.speech-bubble {
    position: absolute;
    bottom: 110%;
    /* Above the card */
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    padding: 8px 12px;
    border-radius: 12px;
    border: 2px solid #000;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: bubble-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, fade-out 0.5s ease-in 2.5s forwards;
    pointer-events: none;
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #000;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #fff;
    z-index: 1;
}

@keyframes bubble-pop {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

@keyframes fade-out {
    to {
        opacity: 0;
        transform: translateX(-50%) scale(0.9) translateY(-10px);
    }
}

/* Enemy Zone UI - Slim Mode */
.enemy-zone {
    flex-basis: 90px;
    /* Much slimmer top bar */
    padding: 5px 20px;
    background: rgba(0, 0, 0, 0.2);
    /* Darker for contrast but slimmer */
    overflow: visible;
    /* Allow popouts */
    z-index: 20;
}

.enemy-zone .hero-card {
    transform: scale(1.0);
    transform-origin: center;
    margin: 0 -5px;
    /* Compensate for scale gap */
}

.enemy-zone .hand-container {
    transform: scale(0.9);
    transform-origin: center;
}

.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    gap: 5px;
    flex-shrink: 0;
}

.hero-avatar {
    font-size: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
}

/* Hero Avatar Card Style */
.hero-card {
    width: 110px;
    height: 130px;
    background: #F5F5F0;
    border: 3px solid #333;
    /* Slightly thicker border for heroes */
    border-radius: 50% 50% 12px 12px;
    /* Tombstone/Minion shape mixed */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    padding: 0;
    transition: box-shadow 0.3s, transform 0.2s;
}

.hero-card .hero-avatar {
    width: 100%;
    height: 100%;
    font-size: 4rem;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card .card-cost {
    top: -10px;
    left: -10px;
    width: auto;
    min-width: 30px;
    height: 30px;
    border-radius: 15px;
    /* Pill shape for "0/10" */
    font-size: 0.8rem;
    padding: 0 5px;
    z-index: 5;
}

.hero-card .stat-health {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border: 3px solid #333;
    z-index: 5;
}

.crown-icon {
    position: absolute;
    top: -35px;
    /* Sit on top */
    left: 50%;
    transform: translateX(-50%) rotate(-10deg);
    /* Centered and jaunty tilt */
    font-size: 2.5rem;
    z-index: 10;
    text-shadow: 0 4px 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    /* Let clicks pass through to card */
}

/* Override dragging states if needed */
.hero-card.damage-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    box-shadow: 0 0 30px #d63031;
    border-color: #d63031;
}

/* Increased height to allow cards to pop up without cutoff */
.player-zone {
    flex: 0 0 200px;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
    overflow: visible;
    /* Ensure popouts aren't clipped by the zone itself */
    z-index: 10;
    /* Ensure it stays above other elements if needed */
}

/* ... skipped ... */

.hand-container {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align to bottom so padding-top is the empty space */
    /* gap: -10px; removed invalid */
    padding: 60px 10px 20px 10px;
    /* Huge top padding for pop-up space */
    height: 100%;
    overflow-x: auto;
    overflow-y: visible;
    /* Try visible, but if x is auto, y might clip. Padding is the safer fix. */
}

/* Cards */
.card {
    width: var(--card-width);
    height: var(--card-height);
    background: #F5F5F0;
    border: 2px solid #333;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    user-select: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    animation: sway 3s ease-in-out infinite;
}

.card:hover {
    transform: translateY(-20px) scale(1.1);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.4);
    border-color: var(--primary-color);
}

.card-cost {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--mana-color);
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid #fff;
    z-index: 2;
}

.card-image {
    font-size: 2.5rem;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-name {
    font-size: 0.7rem;
    text-align: center;
    font-weight: bold;
    margin-bottom: 2px;
    color: #111;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: -5px;
}

.stat-bubble {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    color: #000;
}

.stat-attack {
    background: var(--attack-color);
}

.stat-health {
    background: var(--health-color);
}

.card-back {
    background: #e0e0e0;
    background-image: repeating-linear-gradient(45deg, #e0e0e0 0, #e0e0e0 10px, #d1d1d1 10px, #d1d1d1 20px);
    border: 2px solid #aaa;
}

/* Battlefield */
.battlefield {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
    min-height: 0;
}

.board-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.minion {
    width: 80px;
    height: 100px;
    background: #F5F5F0;
    border: 2px solid #555;
    border-radius: 50% 50% 8px 8px;
    /* Tombstone shape */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s;
    touch-action: none;
    /* Prevent scrolling during drag attack */
    overflow: visible;
    z-index: 10;
}

.minion.ready-to-attack {
    border-color: var(--health-color);
    /* Green normally, but let's encourage aggression */
    box-shadow: 0 0 10px var(--health-color);
    cursor: pointer;
}

.minion.ready-to-attack:hover {
    transform: scale(1.05);
}

.minion-image {
    font-size: 3rem;
    margin-top: 10px;
}

.minion-stats {
    position: absolute;
    bottom: -5px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
    box-sizing: border-box;
}

/* Divider */
.divider {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 20px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    transition: all 0.2s;
    font-family: var(--font-main);
    z-index: 5;
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.btn-primary:disabled {
    background: #636e72;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animations */
.hidden {
    display: none !important;
}

#game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.minion.selected {
    box-shadow: 0 0 15px #ffeaa7;
    /* Attack color glow */
    border-color: #ffeaa7;
    transform: translateY(-5px);
}

.minion.targetable {
    cursor: crosshair;
    box-shadow: 0 0 15px #ff7675;
    /* Health color (damage) glow */
    border-color: #ff7675;
}

.minion.targetable:hover {
    transform: scale(1.05);
}

.minion.damage-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    box-shadow: 0 0 20px #ff7675;
}

.avatar-container.damage-shake .hero-avatar {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    box-shadow: 0 0 30px #d63031;
    border-color: #d63031;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.modal {
    background: #2d3436;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Mute Button */
.mute-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

/* CRT Overlay */
.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    background:
        radial-gradient(circle, rgba(18, 16, 16, 0) 60%, rgba(0, 0, 0, 0.4) 100%),
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 100%, 100% 4px, 6px 100%;
    mix-blend-mode: overlay;
    opacity: 0.8;
}

/* Animations */
@keyframes sway {

    0%,
    100% {
        transform: rotate(-1deg) translateY(0);
    }

    50% {
        transform: rotate(1deg) translateY(-2px);
    }
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.card {
    /* ... existing ... */
    animation: sway 3s ease-in-out infinite;
}

/* Pause sway on hover so interaction is stable */
.card:hover {
    animation-play-state: paused;
    transform: translateY(-30px) scale(1.15) rotate(0deg) !important;
    /* Force upright and bigger */
    z-index: 100;
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.6);
    border-color: var(--accent-color);
}

.minion {
    /* ... existing ... */
    animation: breathe 4s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.5s);
    /* Stagger if we set --i */
}

@keyframes play-pop {
    0% {
        transform: scale(0.5) translateY(50px);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.minion.just-played {
    animation: play-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ... existing mute btn ... */
.mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Deck Styling */
.deck-container {
    width: var(--card-width);
    height: var(--card-height);
    position: relative;
    margin: 0 10px;
    flex-shrink: 0;
    cursor: pointer;
}

.deck-container .card {
    position: absolute;
    top: 0;
    left: 0;
    animation: none;
    /* No sway for deck */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.deck-top {
    z-index: 2;
    transform: translateY(0);
}

#end-turn-btn {
    font-size: 2rem;
    padding: 10px 20px;
    min-width: 80px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

@keyframes sparkle {
    0% {
        box-shadow: 0 0 10px gold;
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 25px gold, 0 0 5px white;
        transform: scale(1.1);
    }

    100% {
        box-shadow: 0 0 10px gold;
        transform: scale(1);
    }
}

.sparkle {
    animation: sparkle 1.5s infinite ease-in-out;
    background: linear-gradient(45deg, #FFD700, #FFA500) !important;
    border-color: #FFF !important;
    color: #FFF !important;
}

.deck-under {
    z-index: 1;
    transform: translate(2px, 2px) rotate(2deg);
    border-color: #444;
}

.deck-under::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border: inherit;
    border-radius: inherit;
    top: 2px;
    left: 2px;
    z-index: -1;
}

/* Drawing Animation Class */
.drawing-card {
    position: fixed;
    z-index: 1000;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    /* Pass through during animation */
}

.dragging {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 9999 !important;
    pointer-events: none;
    /* Crucial for elementFromPoint drop detection */
    transition: transform 0.05s ease-out;
    /* Smooth follow delay */
}

@keyframes explosion {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        transform: scale(1.5);
        opacity: 0.8;
        filter: brightness(2) hue-rotate(-30deg);
    }

    100% {
        transform: scale(2);
        opacity: 0;
        filter: blur(10px) brightness(0);
    }
}

.minion.dying {
    animation: explosion 0.6s ease-out forwards !important;
    pointer-events: none;
    z-index: 2000;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .player-zone {
        flex: 0 0 160px;
        /* Increased from 110px to fit pop-up */
        padding: 5px 0;
        /* Minimized padding */
    }

    .hand-container {
        justify-content: flex-start;
        /* Revert centering to ensure clickability/layout safety */
        overflow-x: auto;
        /* Revert to scrollable just in case squeeze fails */
        padding: 5px 0;
    }

    /* Card Overlap and Sizing */
    .card {
        width: 60px;
        /* Reduced from 85px */
        height: 85px;
        /* Reduced to match aspect ratio */
        flex-shrink: 0;
        /* Don't shrink */
        margin-right: -10px;
        /* slight overlap default, will be controlled by JS */
        transition: margin 0.2s, transform 0.2s;
        touch-action: none;
    }

    .card:first-child {
        margin-left: 0;
    }

    .card:hover {
        /* Pop out */
        transform: translateY(-50px) scale(1.2) !important;
        z-index: 1000;
        margin-right: 20px;
        margin-left: 20px;
    }

    .card-image {
        font-size: 2.5rem;
    }

    .card-name {
        display: none;
        /* Hide name on mobile to save vertical space/clutter */
    }

    .card-cost,
    .stat-bubble {
        font-size: 0.8rem;
        width: 18px;
        height: 18px;
        line-height: 18px;
    }

    .card-cost {
        top: -5px;
        left: -5px;
        border-width: 1px;
    }

    /* Board adjustments */
    .minion {
        width: 70px;
        height: 90px;
    }

    .minion-image {
        font-size: 2.2rem;
    }

    .minion-stats {
        position: absolute;
        bottom: -5px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 0 2px;
    }

    .minion-stats .stat-bubble {
        width: 20px;
        height: 20px;
        font-size: 0.9rem;
    }
}

/* Safety for short screens */
@media (max-height: 700px) {
    .player-zone {
        flex: 0 0 130px;
        padding: 5px;
    }

    .hero-card {
        height: 110px;
        width: 90px;
    }

    .card {
        transform: scale(0.9);
    }

    .battlefield {
        padding: 5px 0;
    }
}

/* Tutorial Styles */
#tutorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.tutorial-modal {
    width: 90%;
    max-width: 800px;
    background: #2d3436;
    color: #dfe6e9;
    text-align: left;
    max-height: 90vh;
    overflow-y: auto;
    /* Reset margins if inherited from .modal which might have them */
    margin: 0;
}

.tutorial-modal h1 {
    text-align: center;
    color: var(--accent-color);
    margin-top: 0;
    font-size: 2.5rem;
}

.tutorial-content {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
    /* responsive */
}

.tutorial-left,
.tutorial-right {
    flex: 1;
    min-width: 300px;
}

.tutorial-left h2,
.tutorial-right h2 {
    color: var(--mana-color);
    border-bottom: 2px solid #555;
    padding-bottom: 5px;
    margin-top: 0;
}

.tutorial-left h3 {
    color: var(--attack-color);
    margin-bottom: 5px;
}

.tutorial-left ul {
    padding-left: 20px;
    line-height: 1.6;
    font-size: 1.2rem;
}

.tutorial-left li {
    margin-bottom: 10px;
}

.tutorial-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 20px;
}

.demo-card {
    transform: scale(1.8);
    margin: 60px 0;
    pointer-events: none;
    /* Just visual */
    animation: none !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.demo-labels {
    position: relative;
    width: 300px;
    height: 0;
}

.label-cost {
    position: absolute;
    top: -220px;
    left: 0px;
    color: var(--mana-color);
    font-weight: bold;
}

.label-cost::after {
    content: ' ↘';
}

.label-attack {
    position: absolute;
    top: -15px;
    left: 75px;
    color: var(--attack-color);
    font-weight: bold;
}

.label-attack::before {
    content: '↑\A';
    white-space: pre;
    text-align: center;
    display: block;
}

.label-health {
    position: absolute;
    top: -15px;
    right: 75px;
    color: var(--health-color);
    font-weight: bold;
}

.label-health::before {
    content: '↑\A';
    white-space: pre;
    text-align: center;
    display: block;
}


.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    border-top: 1px solid #555;
    padding-top: 20px;
}

.dsa-checkbox {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.dsa-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#tutorial-ok-btn {
    min-width: 150px;
    font-size: 1.5rem;
}

@media (max-width: 700px) {
    .tutorial-content {
        flex-direction: column;
        gap: 10px;
    }

    .demo-card {
        margin: 40px auto;
    }
}

/* User Requests: Mobile Fixes */
@media (max-width: 600px) {

    /* 1. Revert Main Opponent Size AND Match Player Hero Size */
    /* Player Hero Card size on mobile is inherited or set? 
       Let's normalize both to be identical and slightly smaller to fit screen safely */
    .enemy-zone .hero-card,
    .user-zone .hero-card {
        width: 85px;
        height: 110px;
        margin: 0 5px;
        /* Add margin to prevent edge-touching */
        flex-shrink: 0;
    }

    .enemy-zone .hero-avatar {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }

    .enemy-zone .crown-icon {
        top: -25px;
        font-size: 1.8rem;
    }

    /* Layout Fixes to prevent cutoff */
    .player-zone {
        justify-content: space-between;
        /* Spread hand/hero apart */
        padding: 5px 2px;
        /* Minimal padding */
    }

    .enemy-zone {
        justify-content: center;
        /* Enemy card was too far left? No, it's just flex-start or center? 
           Let's force space-between pattern but ensure padding */
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    /* Force specific order/alignment for enemy zone components if needed */
    /* Currently: AvatarContainer (Hero), HandContainer */

    .enemy-zone .hand-container {
        /* Pushing right? */
        flex: 1;
        justify-content: center;
    }

    /* Player Zone Layout */
    /* Player Zone Layout */
    .user-zone {
        justify-content: space-between;
        /* Hero Right, Hand Left */
    }

    .user-zone .hand-container {
        flex: 1;
        justify-content: flex-start;
        /* Start from left */
        margin-right: 5px;
        /* Tiny gap to hero */
        overflow: visible;
        /* Let cards flow */
    }

    /* 2. Larger Stats Circles (50% bigger than previous 20px -> 30px) */
    .minion-stats .stat-bubble,
    .card .stat-bubble,
    .card .card-cost,
    .hero-card .stat-health,
    .hero-card .card-cost {
        width: 27px;
        height: 27px;
        /* Ensure circular shape */
        min-width: 27px;
        border-radius: 50% !important;

        font-size: 1.4rem;
        line-height: 1;
        /* Adjust for border */
        border-width: 2px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Adjust positioning for larger bubbles */
    /* Adjust positioning for larger bubbles */
    /* Adjust positioning for larger bubbles to be INSIDE & FLUSH */
    .minion-stats {
        bottom: 0px;
        justify-content: center;
        gap: 0px;
        width: 100%;
    }

    .hero-card .stat-health {
        bottom: 0px;
        right: 0px;
        border-radius: 50%;
    }

    .card-cost {
        top: 0px;
        left: 0px;
        border-radius: 50%;
    }

    /* Fix Playing Card Stats Alignment */
    /* Fix Playing Card Stats Alignment (INSIDE & FLUSH) */
    /* Fix Playing Card Stats Alignment (INSIDE & FLUSH) */
    .card .card-stats {
        position: absolute;
        bottom: 0px;
        left: 0;
        transform: none;
        width: 100%;
        padding: 0;
        /* Flush with edges */
        margin: 0;
        justify-content: space-between;
    }

    /* SQUEEZED LAYOUT: Move Health to Left Vertical Center */
    .card.squeezed .card-stats {
        height: 100%;
        top: 0;
        left: 0;
        width: 100%;
        pointer-events: none;
    }

    .card.squeezed .stat-health {
        position: absolute;
        bottom: auto;
        top: 50%;
        left: 2px;
        transform: translateY(-50%);
        right: auto;
        z-index: 10;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    }

    .card.squeezed .stat-attack {
        position: absolute;
        bottom: 2px;
        left: 2px;
        z-index: 10;
    }

    .card.squeezed .card-cost {
        top: 2px;
        left: 2px;
        z-index: 10;
    }

    /* Ensure mute button is clickable */
    .mute-btn {
        z-index: 3000;
        width: 44px;
        /* Slightly larger touch target */
        height: 44px;
    }
}