:root {
    --green: #33ff33;
    --amber: #ffaa00;
    --dark: #0a0a0a;
    --panel: #1a1a1a;
    --border: #33ff33;
    --dim: #1a6b1a;
    --red: #ff3333;
    --blue: #33aaff;
}

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

body {
    background: var(--dark);
    color: var(--green);
    font-family: 'Press Start 2P', monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* CRT Scanline Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 3px);
    pointer-events: none;
    z-index: 1000;
}

/* CRT Flicker */
@keyframes flicker {
    0% {
        opacity: 0.97;
    }

    5% {
        opacity: 0.95;
    }

    10% {
        opacity: 0.98;
    }

    15% {
        opacity: 0.96;
    }

    20% {
        opacity: 0.99;
    }

    50% {
        opacity: 0.96;
    }

    80% {
        opacity: 0.98;
    }

    90% {
        opacity: 0.95;
    }

    100% {
        opacity: 0.98;
    }
}

.crt {
    animation: flicker 4s infinite;
    width: 90%;
    max-width: 800px;
    padding: 20px;
}

.title {
    text-align: center;
    font-size: 24px;
    padding: 20px 0 10px;
    letter-spacing: 3px;
    color: var(--amber);
    text-shadow: 0 0 20px rgba(255, 170, 0, 0.5),
        0 0 40px rgba(255, 170, 0, 0.3);
    letter-spacing: 4px;
}

.subtitle {
    text-align: center;
    font-size: 8px;
    color: var(--dim);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.scoreboard {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px;
    margin: 10px 0;
    border: 2px solid var(--border);
    background: var(--panel);
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.2),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    width: 100%;
}

.score-item {
    text-align: center;
}

.score-item-clickable {
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 12px 18px;
    margin: -12px -18px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.score-item-clickable:hover {
    background: rgba(51, 255, 51, 0.1);
}

.score-item-clickable:active {
    background: rgba(51, 255, 51, 0.25);
    transform: scale(0.96);
}

.score-label {
    font-size: 8px;
    color: var(--dim);
    margin-bottom: 4px;
}

.score-value {
    font-size: 16px;
    color: var(--green);
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.5);
}

.score-value.human-score {
    color: var(--blue);
    text-shadow: 0 0 10px rgba(51, 170, 255, 0.5);
}

.score-value.sock-score {
    color: var(--red);
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

.score-value.draw-score {
    color: var(--amber);
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
}

/* Arena */
.arena {
    border: 2px solid var(--border);
    background: var(--panel);
    padding: 15px;
    margin: 15px 0;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.2),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.arena-idle {
    font-size: 12px;
    color: var(--dim);
    text-align: center;
    line-height: 2;
}

.battle-display {
    display: none;
    width: 100%;
    text-align: center;
    max-height: 170px;

}

.battle-display.active {
    display: block;
}

.fighters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.fighter {
    text-align: center;
}

.fighter-label {
    font-size: 8px;
    color: var(--dim);
    margin-bottom: 8px;
}

.fighter-icon {
    font-size: 56px;
    margin-bottom: 8px;
    display: block;
}

.fighter-name {
    font-size: 10px;
    color: var(--green);
}

.vs-text {
    font-size: 20px;
    color: var(--amber);
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
    padding: 0 10px;
}

.result-text {
    font-size: 14px;
    margin: 15px 0;
    line-height: 1.8;
    min-height: 50px;
}

.result-win {
    color: var(--blue);
    text-shadow: 0 0 10px rgba(51, 170, 255, 0.3);
}

.result-lose {
    color: var(--red);
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.3);
}

.result-draw {
    color: var(--amber);
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.flavor-text {
    font-size: 11px;
    color: var(--green);
    margin: 10px 0;
    text-shadow: 0 0 8px rgba(51, 255, 51, 0.3);
}

/* Sock Quote */
.sock-quote {
    border: 1px solid var(--dim);
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    margin: 10px 0;
    font-size: 9px;
    color: var(--amber);
    line-height: 1.8;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sock-quote::before {
    content: '🧦 ';
    padding-right: 10px;
    font-size: 160%;
    position: relative;
    top: -4px;
}

/* Choices */
.choices-label {
    text-align: center;
    font-size: 10px;
    color: var(--amber);
    margin: 15px 0 10px;
    letter-spacing: 2px;
}

.choices {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 20px;
}

.choice-btn {
    background: var(--panel);
    border: 2px solid var(--dim);
    color: var(--green);
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 12px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 90px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.choice-btn:hover {
    border-color: var(--green);
    box-shadow: 0 0 15px rgba(51, 255, 51, 0.3),
        inset 0 0 10px rgba(51, 255, 51, 0.1);
    transform: translateY(-2px);
}

.choice-btn:active {
    transform: translateY(1px);
    box-shadow: 0 0 5px rgba(51, 255, 51, 0.2);
}

.choice-btn .icon {
    font-size: 28px;
}

.choice-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Streak indicator */
.streak {
    text-align: center;
    font-size: 8px;
    color: var(--dim);
    margin: 5px 0;
    min-height: 16px;
}

.streak.hot {
    color: var(--amber);
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
}

/* Round counter */
.round-counter {
    text-align: center;
    font-size: 8px;
    color: var(--dim);
    margin-top: 10px;
}

/* Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-80px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(80px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes victoryPop {
    0%   { transform: scale(0.2) rotate(-8deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
    80%  { transform: scale(0.95) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-3px, 3px);
    }

    40% {
        transform: translate(3px, -3px);
    }

    60% {
        transform: translate(-3px, -3px);
    }

    80% {
        transform: translate(3px, 3px);
    }

    100% {
        transform: translate(0);
    }
}

.slide-left {
    animation: slideInLeft 0.4s ease-out;
}

.slide-right {
    animation: slideInRight 0.4s ease-out;
}

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

.glitch {
    animation: glitch 0.3s ease-out;
}

/* Footer */
.footer {
    text-align: center;
    font-size: 7px;
    color: var(--dim);
    padding: 20px;
    line-height: 2;
}

/* Rules modal */
.rules-btn {
    background: none;
    border: 1px solid var(--dim);
    color: var(--dim);
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px 16px;
    cursor: pointer;
    margin: 10px auto;
    display: block;
    transition: all 0.15s ease;
}

.rules-btn:hover {
    border-color: var(--green);
    color: var(--green);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--panel);
    border: 2px solid var(--green);
    padding: 25px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 0 30px rgba(51, 255, 51, 0.3);
    position: relative;
}

.modal-close-top {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--dim);
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-close-top:hover {
    color: var(--red);
    transform: scale(1.1);
}

.modal h2 {
    color: var(--amber);
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.modal-close {
    background: none;
    border: 1px solid var(--red);
    color: var(--red);
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px 16px;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--red);
    color: var(--dark);
}

.rules-grid {
    display: grid;
    gap: 15px;
}

.rule-section h3 {
    font-size: 10px;
    color: var(--green);
    margin-bottom: 8px;
}

.rule-line {
    font-size: 8px;
    color: var(--dim);
    line-height: 2.2;
}

.rule-line .win {
    color: var(--green);
}

.rule-line .lose {
    color: var(--red);
}

/* Responsive */
@media (max-width: 600px) {
    .zoom-btn {
        display: none !important;
    }

    .title {
        font-size: 18px;
    }

    .choice-btn {
        min-width: 70px;
        padding: 10px 6px;
    }

    .choice-btn .icon {
        font-size: 22px;
    }

    .choice-btn {
        font-size: 7px;
    }

    .fighters {
        gap: 15px;
    }

    .fighter-icon {
        font-size: 40px;
    }

    .scoreboard {
        gap: 15px;
    }

    .score-value {
        font-size: 18px;
    }
}

.reset-btn {
    background: none;
    border: 1px solid #ff3333;
    color: #ff3333;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px 16px;
    cursor: pointer;
    margin: 10px auto;
    display: block;
    transition: all 0.15s ease;
}

.reset-btn:hover {
    background: #ff3333;
    color: #0a0a0a;
}

/* ── Win Target Bar ─────────────────────────────────── */
.win-target-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 6px 0 4px;
    padding: 7px 14px;
    border: 1px solid #1a6b1a;
    background: rgba(0,0,0,0.3);
}

.win-target-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: #1a6b1a;
    letter-spacing: 1px;
}

.win-target-value {
    font-family: 'Press Start 2P', monospace;
    font-size: 13px;
    color: #ffaa00;
    text-shadow: 0 0 8px rgba(255,170,0,0.5);
    min-width: 32px;
    text-align: center;
}

.win-target-adj {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: #1a6b1a;
    background: none;
    border: 1px solid #1a6b1a;
    padding: 4px 7px;
    cursor: pointer;
    transition: all 0.12s ease;
    line-height: 1;
}

.win-target-adj:hover {
    color: #33ff33;
    border-color: #33ff33;
    box-shadow: 0 0 6px rgba(51,255,51,0.3);
}

.win-target-adj:active {
    transform: scale(0.92);
}

/* ── Name Entry Modal ───────────────────────────────── */
.name-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9000;
    justify-content: center;
    align-items: center;
    animation: nameOverlayIn 0.3s ease;
}

.name-modal-overlay.active {
    display: flex;
}

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

.name-modal {
    position: relative;
    background: #0a0a0a;
    border: 4px solid #33ff33;
    box-shadow:
        0 0 0 2px #0a0a0a,
        0 0 0 4px #ffaa00,
        0 0 40px rgba(51,255,51,0.6),
        0 0 80px rgba(255,170,0,0.3),
        inset 0 0 60px rgba(51,255,51,0.04);
    padding: 0;
    width: 520px;
    max-width: 92vw;
    overflow: hidden;
    animation: nameModalIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes nameModalIn {
    from { transform: scale(0.5) translateY(-40px); opacity: 0; }
    to   { transform: scale(1) translateY(0);       opacity: 1; }
}

.name-modal-scanlines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.25) 2px,
        rgba(0,0,0,0.25) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.name-modal-border-fx {
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border: 1px solid rgba(255,170,0,0.25);
    pointer-events: none;
    z-index: 1;
}

.name-modal-inner {
    position: relative;
    z-index: 2;
    padding: 40px 36px 36px;
    text-align: center;
}

.name-modal-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 18px;
    color: #ffaa00;
    text-shadow:
        0 0 10px rgba(255,170,0,0.8),
        0 0 20px rgba(255,170,0,0.5),
        3px 3px 0 #7a4000;
    margin-bottom: 10px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { text-shadow: 0 0 10px rgba(255,170,0,0.8), 0 0 20px rgba(255,170,0,0.5), 3px 3px 0 #7a4000; }
    50%       { text-shadow: 0 0 20px rgba(255,170,0,1),   0 0 40px rgba(255,170,0,0.8), 3px 3px 0 #7a4000; }
}

.name-title-sock {
    font-size: 22px;
    animation: sockBounce 1s ease-in-out infinite alternate;
}

@keyframes sockBounce {
    from { transform: translateY(0)   rotate(-10deg); }
    to   { transform: translateY(-6px) rotate(10deg); }
}

.name-modal-subtitle {
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: #33ff33;
    letter-spacing: 4px;
    margin-bottom: 34px;
    opacity: 0.7;
}

.name-input-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.name-cursor-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #33ff33;
    opacity: 0.5;
}

.name-input {
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    color: #33ff33;
    background: #0d0d0d;
    border: 2px solid #33ff33;
    box-shadow: 0 0 12px rgba(51,255,51,0.3), inset 0 0 10px rgba(51,255,51,0.05);
    padding: 12px 16px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    outline: none;
    width: 260px;
    caret-color: #ffaa00;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.name-input:focus {
    border-color: #ffaa00;
    box-shadow: 0 0 20px rgba(255,170,0,0.5), inset 0 0 10px rgba(255,170,0,0.05);
}

.name-input::placeholder {
    color: #1a4a1a;
    letter-spacing: 2px;
}

.name-modal-hint {
    font-family: 'Press Start 2P', monospace;
    font-size: 6px;
    color: #1a6b1a;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.name-confirm-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    color: #0a0a0a;
    background: #33ff33;
    border: none;
    padding: 14px 32px;
    cursor: pointer;
    letter-spacing: 2px;
    box-shadow: 4px 4px 0 #1a7a1a, 0 0 20px rgba(51,255,51,0.4);
    transition: all 0.1s ease;
    animation: btnGlow 1.5s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 4px 4px 0 #1a7a1a, 0 0 20px rgba(51,255,51,0.4); }
    50%       { box-shadow: 4px 4px 0 #1a7a1a, 0 0 35px rgba(51,255,51,0.8); }
}

.name-confirm-btn:hover {
    background: #ffaa00;
    color: #0a0a0a;
    box-shadow: 4px 4px 0 #7a4000, 0 0 30px rgba(255,170,0,0.6);
    transform: translate(-1px, -1px);
}

.name-confirm-btn:active {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 #1a7a1a;
}

/* ── End Name Entry Modal ───────────────────────────── */

.confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.confirm-overlay.active {
    display: flex;
}

.confirm-box {
    background: #1a1a1a;
    border: 2px solid #ff3333;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 51, 51, 0.3);
}

.confirm-box h3 {
    color: #ffaa00;
    font-size: 12px;
    margin-bottom: 15px;
}

.confirm-box p {
    color: #33ff33;
    font-size: 9px;
    margin-bottom: 25px;
    line-height: 2;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.confirm-yes {
    background: none;
    border: 1px solid #ff3333;
    color: #ff3333;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.confirm-yes:hover {
    background: #ff3333;
    color: #0a0a0a;
}

.confirm-no {
    background: none;
    border: 1px solid #33ff33;
    color: #33ff33;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.confirm-no:hover {
    background: #33ff33;
    color: #0a0a0a;
}

.audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #1a6b1a;
    background: rgba(0, 0, 0, 0.3);
}

.sound-toggle {
    background: none;
    border: 1px solid #1a6b1a;
    color: #1a6b1a;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sound-toggle.active {
    border-color: #33ff33;
    color: #33ff33;
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.2);
}

.sound-toggle:hover {
    border-color: #33ff33;
    color: #33ff33;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: #1a6b1a;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 6px;
    background: #1a6b1a;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #33ff33;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(51, 255, 51, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #33ff33;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(51, 255, 51, 0.4);
}

.talink a {
    color: #0c7a32;
    text-decoration: none;
}

/* Mobile Optimization - Keep Desktop Unchanged */
@media (max-width: 600px) {

    /* Compress vertical spacing */
    .crt {
        padding: 10px;
        width: 95%;
    }

    .title {
        font-size: 20px;
        padding: 10px 0 5px;
        letter-spacing: 2px;
    }

    .subtitle {
        margin-bottom: 8px;
        font-size: 7px;
    }

    /* Compact scoreboard */
    .scoreboard {
        gap: 8px;
        padding: 8px;
        margin: 5px 0;
        width: 100%;
    }

    .score-label {
        font-size: 7px;
        margin-bottom: 2px;
    }

    .score-value {
        font-size: 14px;
    }

    /* Full-width win target bar */
    .win-target-bar {
        margin: 5px 0;
        padding: 6px;
        gap: 4px;
        width: 100%;
    }
    .win-target-label {
        font-size: 6px;
        letter-spacing: 0;
    }
    .win-target-value {
        font-size: 12px;
        min-width: 24px;
    }
    .win-target-adj {
        padding: 12px 4px;
        font-size: 8px;
        flex: 1;
    }

    /* Full-width audio controls */
    .audio-controls {
        margin: 5px 0;
        padding: 6px;
        gap: 6px;
        width: 100%;
        flex-wrap: wrap;
    }

    .sound-toggle {
        font-size: 8px;
        padding: 12px 4px;
        letter-spacing: 0;
        flex: 1;
        white-space: nowrap;
    }

    .volume-control {
        width: 100%;
        justify-content: center;
        padding: 10px;
        background: rgba(0,0,0,0.4);
        border: 1px solid #1a6b1a;
        border-radius: 4px;
        gap: 15px;
    }

    .volume-slider {
        flex: 1;
        height: 16px;
        width: auto;
    }

    .volume-slider::-webkit-slider-thumb {
        width: 36px;
        height: 36px;
    }

    .volume-slider::-moz-range-thumb {
        width: 36px;
        height: 36px;
    }

    .volume-label {
        font-size: 8px;
        margin-right: 0;
    }

    /* Compress arena significantly */
    .arena {
        padding: 10px;
        margin: 5px 0;
        min-height: 140px;
    }

    .arena-idle {
        font-size: 10px;
        line-height: 1.6;
    }

    .battle-display {
        max-height: 120px;
    }

    .fighters {
        gap: 15px;
        margin-bottom: 10px;
    }

    .fighter-icon {
        font-size: 32px;
        margin-bottom: 4px;
    }

    .fighter-label {
        font-size: 7px;
        margin-bottom: 4px;
    }

    .fighter-name {
        font-size: 8px;
    }

    .vs-text {
        font-size: 16px;
    }

    .result-text {
        font-size: 12px;
        margin: 8px 0;
        min-height: 30px;
    }

    .flavor-text {
        font-size: 9px;
        margin: 5px 0;
    }

    /* Compact quote */
    .sock-quote {
        padding: 8px;
        margin: 5px 0;
        min-height: 40px;
        font-size: 8px;
        line-height: 1.6;
    }

    .sock-quote::before {
        font-size: 140%;
        top: -2px;
    }

    /* Compact choices section */
    .choices-label {
        font-size: 9px;
        margin: 8px 0 5px;
    }

    .choices {
        gap: 5px;
        margin: 5px 0 10px;
    }

    /* Make buttons smaller but tappable */
    .choice-btn {
        min-width: 60px;
        padding: 8px 4px;
        font-size: 7px;
        gap: 4px;
    }

    .choice-btn .icon {
        font-size: 20px;
    }

    /* Compact round counter */
    .round-counter {
        margin-top: 5px;
        margin-bottom: 5px;
    }

    /* Compact footer */
    .footer {
        padding: 10px;
        line-height: 1.8;
    }

    /* Compact modals */
    .modal {
        padding: 15px;
    }

    .modal h2 {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .rule-section h3 {
        font-size: 9px;
    }

    .rule-line {
        font-size: 7px;
        line-height: 1.8;
    }

    .confirm-box {
        padding: 20px;
    }

    .confirm-box h3 {
        font-size: 10px;
    }

    .confirm-box p {
        font-size: 8px;
    }
}

/* Extra tight for very small screens (iPhone SE, etc) */
@media (max-width: 380px) {
    .arena {
        min-height: 120px;
    }

    .fighter-icon {
        font-size: 28px;
    }

    .choice-btn {
        min-width: 55px;
        padding: 6px 3px;
        font-size: 6px;
    }

    .choice-btn .icon {
        font-size: 18px;
    }

    .sock-quote {
        font-size: 7px;
        min-height: 35px;
    }
}