/* =========================================================
   SALÓN ARCADE RETRO - MEGABLAST XENON 2 ENHANCED STYLES
   ========================================================= */

.arcade-main-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #f8fafc;
    max-width: 1240px;
    margin: 0 auto;
}

.arcade-main-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 960px) {
    .arcade-main-grid {
        grid-template-columns: 1fr;
    }
}

/* LEFT COLUMN: LEADERBOARD RANKING */
.leaderboard-column {
    background: #1e293b;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #334155;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.leaderboard-column h3 {
    margin-top: 0;
    color: #facc15;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #334155;
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.lb-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}
.lb-tab-btn {
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s;
}
.lb-tab-btn:hover { background: #334155; color: #fff; }
.lb-tab-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
}
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.leaderboard-table th {
    background: #0f172a;
    color: #94a3b8;
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid #334155;
}
.leaderboard-table td {
    padding: 8px;
    border-bottom: 1px solid #334155;
}
.leaderboard-table tr:hover {
    background: #334155;
}
.rank-badge {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 11px;
}
.rank-1 { background: #facc15; color: #000000; }
.rank-2 { background: #94a3b8; color: #000000; }
.rank-3 { background: #b45309; color: #ffffff; }
.rank-other { background: #334155; color: #ffffff; }

/* RIGHT COLUMN: GAME CANVAS & SELECTOR */
.game-column {
    background: #0f172a;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.arcade-header {
    text-align: center;
    border-bottom: 2px solid #334155;
    padding-bottom: 12px;
    margin-bottom: 15px;
}
.arcade-header h2 {
    color: #38bdf8;
    margin: 0;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.arcade-header p {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 4px;
}
.arcade-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}
@media (max-width: 640px) {
    .arcade-selector { grid-template-columns: repeat(2, 1fr); }
}
.game-tab {
    background: #1e293b;
    border: 2px solid #334155;
    color: #f8fafc;
    padding: 10px 6px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 13px;
}
.game-tab:hover {
    background: #334155;
    border-color: #38bdf8;
}
.game-tab.active {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}
.canvas-wrapper {
    position: relative;
    text-align: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #334155;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}
canvas {
    display: block;
    margin: 0 auto;
    background: #000000;
    max-width: 100%;
    height: auto;
}
.arcade-controls-hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: #cbd5e1;
}
.ctrl-buttons-group {
    display: flex;
    gap: 6px;
    align-items: center;
}
.touch-controls {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
    user-select: none;
}
@media (max-width: 768px) {
    .touch-controls { display: grid; }
}
.t-btn {
    background: #334155;
    color: white;
    border: none;
    padding: 14px 6px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    touch-action: manipulation;
}
.t-btn:active { background: #0284c7; }
.t-btn-bomb { background: #dc2626; }

/* TIENDA ALIENÍGENA ENTRE NIVELES (XENON SWOP SHOP) */
.shop-modal-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.96);
    z-index: 120;
    justify-content: center;
    align-items: center;
    padding: 15px;
}
.shop-modal-box {
    background: #1e293b;
    border: 2px solid #facc15;
    border-radius: 12px;
    padding: 20px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 0 35px rgba(250, 204, 21, 0.35);
}
.shop-header {
    text-align: center;
    border-bottom: 2px solid #334155;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.shop-header h3 {
    margin: 0;
    color: #facc15;
    font-size: 20px;
}
.shop-credits {
    font-size: 16px;
    font-weight: bold;
    color: #38bdf8;
    margin-top: 5px;
}
.shop-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}
.shop-item-btn {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px;
    color: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}
.shop-item-btn:hover {
    border-color: #facc15;
    background: #334155;
}
.shop-item-title {
    font-size: 13px;
    font-weight: bold;
    color: #facc15;
}
.shop-item-cost {
    font-size: 12px;
    color: #38bdf8;
    margin-top: 3px;
}
.shop-close-btn {
    background: #16a34a;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

/* REGISTRO DE NOMBRE DEBAJO DEL CANVAS */
.score-submission-card {
    display: none;
    background: #1e293b;
    border: 2px solid #38bdf8;
    border-radius: 10px;
    padding: 18px;
    margin-top: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}
.score-submission-card h3 {
    margin-top: 0;
    color: #38bdf8;
    font-size: 18px;
    margin-bottom: 6px;
}
.score-submission-card p {
    color: #cbd5e1;
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 12px;
}
.score-flex-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    max-width: 450px;
    margin: 0 auto;
}
@media (max-width: 500px) {
    .score-flex-inputs { flex-direction: column; }
}
.score-input {
    flex: 1;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #475569;
    border-radius: 6px;
    background: #0f172a;
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    box-sizing: border-box;
}
.score-save-btn {
    background: #0284c7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}
.score-save-btn:hover { background: #0369a1; }
