:root {
    --header-bg: rgba(0, 0, 0, 0.95);
    --header-border: rgba(201, 168, 76, 0.2);
    --header-nav-color: #aa9966;
}

body {
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    font-family: 'Press Start 2P', monospace;
    min-height: 100vh;
}

.header {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
}

.arcade-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.08) 0px,
        rgba(0,0,0,0.08) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 1;
}

.arcade-frame {
    width: min(96vw, 96vh*1.333);
    aspect-ratio: 4/3;
    background: radial-gradient(ellipse at 50% 25%, #0e1b30 0%, #070f1c 35%, #020508 65%, #000 100%);
    display: flex;
    flex-direction: column;
    padding: 2.5vh 2vw;
    position: relative;
}

.arcade-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 35%;
    background: radial-gradient(ellipse at 50% 0%, rgba(20,60,120,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.title {
    text-align: center;
    color: #d4a843;
    font-size: clamp(11px, 2.8vh, 26px);
    letter-spacing: 3px;
    padding: 0 0 0.3vh;
    text-shadow: 0 0 15px rgba(212,168,67,0.35), 0 0 4px rgba(212,168,67,0.6), 2px 2px 0 #000;
    white-space: nowrap;
    position: relative;
}

.subtitle {
    text-align: center;
    color: #6a7a8a;
    font-size: clamp(5px, 1.1vh, 10px);
    letter-spacing: 5px;
    text-shadow: 1px 1px 0 #000;
}

.grid-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.4vh, 16px);
}

.grid-row {
    display: grid;
    gap: clamp(4px, 0.7vh, 9px);
    justify-content: center;
    height: 20%;
}

.grid-row.row-1 { grid-template-columns: repeat(7, 1fr); }
.grid-row.row-2,
.grid-row.row-3,
.grid-row.row-4 { grid-template-columns: repeat(5, 1fr); }

.fighter {
    width: 100%;
    background: #000;
    border: 2px solid #151e2a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.06s, box-shadow 0.06s, transform 0.06s;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 18px rgba(0,0,0,0.95), inset 0 0 4px rgba(0,0,0,1);
}

.fighter:hover {
    border-color: #eb0303;
    transform: scale(1.09);
    z-index: 10;
}

.fighter img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
    display: block;
}

.fighter-name {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #d4a843;
    font-size: clamp(3.5px, 0.7vh, 7px);
    text-align: center;
    padding: 3px 0 2px;
    opacity: 0;
    transition: opacity 0.1s;
    text-shadow: 1px 1px 0 #000;
    letter-spacing: 0.5px;
}

.fighter:hover .fighter-name { opacity: 1; }

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.93);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

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

.modal {
    background: #080804;
    border: 2px solid #d4a843;
    font-family: 'Sixtyfour', monospace;
    font-size: 22px;
    border-radius: 2px;
    height: 90vh;
    overflow-y: auto;
    padding: clamp(16px, 3vh, 32px);
    position: relative;
    box-shadow: 0 0 50px rgba(212,168,67,0.08), inset 0 0 30px rgba(212,168,67,0.02);
}

.modal-close {
    position: absolute;
    top: 8px; right: 12px;
    background: none; border: none;
    color: #d4a843;
    font-family: 'Sixtyfour', monospace;
    font-size: clamp(18px, 3vh, 32px);
    cursor: pointer; z-index: 2;
}

.modal-close:hover { color: #fff; }

.modal-header {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vh, 20px);
    margin-bottom: clamp(8px, 1.5vh, 20px);
    padding-bottom: clamp(6px, 1vh, 14px);
    border-bottom: 1px solid #1a1a0a;
}

.modal-header img {
    width: clamp(48px, 8vh, 120px);
    height: auto;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
    flex-shrink: 0;
}

.modal-header h2 {
    color: #d4a843;
    font-size: 1.3em;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(212,168,67,0.2);
}

.modal-section { margin-bottom: clamp(8px, 1.5vh, 18px); }

.modal-section h3 {
    color: #d4a843;
    font-size: 1.1em;
    letter-spacing: 2px;
    margin-bottom: clamp(4px, 0.6vh, 8px);
    border-bottom: 1px solid #121208;
    padding-bottom: clamp(2px, 0.3vh, 6px);
}

.modal-section table {
    width: 100%;
    border-collapse: collapse;
}

.modal-section td {
    padding: clamp(2px, 0.3vh, 6px) clamp(4px, 0.5vh, 8px);
    border-bottom: 1px solid #0a0a04;
    vertical-align: top;
}

.modal-section td:first-child {
    color: #d4a843;
    white-space: nowrap;
    width: 1%;
    padding-right: clamp(8px, 1vw, 16px);
}

.modal-section td:last-child { color: #777; }

.note {
    color: #3a3a1a;
    font-size: 0.85em;
    font-style: italic;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #040404; }
::-webkit-scrollbar-thumb { background: #1a1a0a; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #2a2a15; }
