/* =========================
   🔥 CONTROLE DE RENDER (ANTI-FLICKER)
========================= */
body.page-arena {
    visibility: hidden;
    background: #09090b;
    margin: 0;
    padding: 0;
    color: #e4e4e7;
    font-family: 'Inter', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body.page-arena.ready {
    visibility: visible;
}

/* ========================================
   CONTAINER
======================================== */
.arena-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 10px 12px 100px;
    box-sizing: border-box;
}

/* ========================================
   HEADER
======================================== */
.arena-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111113;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #27272a;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.arena-info h1 {
    font-size: 16px;
    color: #facc15;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.arena-info p {
    font-size: 12px;
    color: #71717a;
    margin: 0;
}

.energy-box {
    text-align: center;
    background: #09090b;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #27272a;
}

.energy-label {
    font-size: 10px;
    color: #71717a;
    text-transform: uppercase;
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
}

.energy-value {
    font-size: 18px;
    color: #facc15;
    font-weight: bold;
}

.energy-timer {
    font-size: 10px;
    color: #a1a1aa;
    font-family: monospace;
}

/* ========================================
   ENEMY CARD
======================================== */
.enemy-card {
    background: #111113;
    border-radius: 12px;
    border: 1px solid #27272a;
    overflow: hidden;
    text-align: center;
    padding-bottom: 15px;
    position: relative;
    margin-bottom: 12px;
    user-select: none;
    -webkit-user-select: none;
}

.card-header {
    background: #18181b;
    padding: 8px;
    font-size: 11px;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #27272a;
    font-weight: 800;
}

.enemy-visual {
    padding: 15px;
    background: radial-gradient(circle, #1e1b4b 0%, #111113 70%);
}

.enemy-visual img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.3));
}

.enemy-name {
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    margin: 8px 0 4px 0;
}

.enemy-power {
    font-size: 13px;
    color: #facc15;
    margin-bottom: 12px;
    font-weight: 600;
}

.enemy-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 15px;
}

.stat-item {
    background: #09090b;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #27272a;
}

.stat-icon {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 12px;
    font-weight: bold;
    color: #e4e4e7;
}

/* ========================================
   ACTIONS & BUTTONS
======================================== */
.arena-actions {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-battle {
    display: block;
    width: 100%;
    height: 44px;
    background: #b91c1c;
    border: 1px solid #991b1b;
    border-radius: 8px;
    color: white;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.12s ease, background 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.btn-battle:active {
    transform: scale(0.97);
    background: #991b1b;
}

.btn-battle:disabled {
    background: #09090b;
    border-color: #27272a;
    color: #71717a;
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   ATALHOS (X1 e X10)
======================================== */
.hidden {
    display: none !important;
}

.shortcuts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-shortcut {
    background: #18181b;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    padding: 10px;
    color: #f4f4f5;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.12s ease, border-color 0.12s ease;
    touch-action: manipulation;
}

.btn-shortcut:active {
    transform: scale(0.97);
}

.btn-shortcut.locked {
    background: #111113;
    border-color: #27272a;
    color: #71717a;
    cursor: not-allowed;
    opacity: 0.6;
}

.shortcut-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.shortcut-price {
    font-size: 12px;
    font-weight: bold;
    color: #facc15;
}

.btn-shortcut.locked .shortcut-price {
    color: #71717a;
}

/* ========================================
   BATTLE LOG
======================================== */
.battle-log {
    background: #111113;
    border-radius: 12px;
    border: 1px solid #27272a;
    padding: 15px;
}

.battle-log h3 {
    font-size: 12px;
    color: #a1a1aa;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    border-bottom: 1px solid #27272a;
    padding-bottom: 8px;
}

.log-container {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.arena-log-item {
    font-size: 11px;
    padding: 8px 10px;
    background: #09090b;
    border-radius: 6px;
    border-left: 3px solid #facc15;
    color: #d4d4d8;
    animation: fadeIn 0.3s ease;
}

.arena-log-empty {
    text-align: center;
    color: #52525b;
    font-size: 12px;
    padding: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   MOBILE RESPONSIVE
======================================== */
@media(max-width: 400px) {
    .arena-info h1 { font-size: 15px; }
    .enemy-name { font-size: 16px; }
    .btn-battle { height: 40px; font-size: 13px; }
}
