/* Arena art direction: sharp editorial typography, a kinetic playing field. */
:root {
  --bg-deep: #141514; --bg-card: #1c1e1c; --bg-card2: #242624;
  --border: #3d403b; --text: #f1efe5; --text-muted: #b1b3a8; --text-dim: #898d82;
  --red: #ed462f; --red-bright: #ff573b; --accent: #ed462f;
  --gold: #dbed9b; --gold-bright: #e5f8ad;
  --radius: 3px; --radius-lg: 5px; --shadow-glow: none;
}
body::before { background: none; filter: none; }
body::after { background: none; }
body { background: var(--bg-deep); }
button, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.site-header { padding: 22px max(28px, calc((100vw - 1240px)/2)); background: #141514; border-color: var(--border); backdrop-filter: none; }
.logo-area { flex-direction: row; align-items: center; gap: 13px; }
.brand-grid { display: grid; grid-template-columns: repeat(3, 7px); gap: 3px; transform: rotate(-9deg); }
.brand-grid i { height: 7px; background: var(--text); }
.brand-grid i:nth-child(1), .brand-grid i:nth-child(5), .brand-grid i:nth-child(9) { background: var(--red); }
.logo-title { color: var(--text); background: none; -webkit-text-fill-color: currentColor; font-size: 1.9rem; letter-spacing: 1px; }
.logo-subtitle { font-size: .65rem; letter-spacing: .2px; text-transform: none; }
.btn-icon { background: transparent; border: none; border-radius: 0; padding: 9px 12px; font-size: .75rem; }
#report-btn { color: var(--text-muted); }
#lang-toggle { border: 1px solid var(--border); min-width: 43px; }
#main-menu.active { padding: 0 28px; max-width: 1296px; width: 100%; margin: auto; align-items: stretch; }
.arena-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; align-items: center; padding: 56px 0 48px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: .63rem; font-weight: 600; letter-spacing: 1.7px; line-height: 1.5; }
.status-dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 4px #ed462f18; }
#arena-title { font-family: 'Bebas Neue', Impact, sans-serif; font-size: clamp(3.8rem, 6.9vw, 6.3rem); line-height: .94; letter-spacing: -.6px; margin: 24px 0 22px; }
#arena-title > span { display: block; }
#arena-title > span:nth-child(2) { color: var(--red-bright); }
#arena-title .hero-outline { font-size: .82em; color: transparent; -webkit-text-stroke: 1px var(--text); }
.hero-description { color: var(--text-muted); font-size: .92rem; line-height: 1.65; max-width: 365px; }
.hero-rules { display: flex; gap: 18px; margin-top: 28px; }
.hero-rules > span { display: flex; flex-direction: column; gap: 9px; font-size: .61rem; color: var(--text-muted); }
.hero-rules b { font-family: monospace; font-weight: 400; color: var(--gold); font-size: .68rem; }
.arena-art { position: relative; height: 380px; overflow: hidden; border: 1px solid #42463f; background-color: #20241f; background-image: linear-gradient(#ffffff05 1px, transparent 1px), linear-gradient(90deg, #ffffff05 1px, transparent 1px); background-size: 24px 24px; }
.art-topline, .art-bottomline { position: absolute; right: 18px; left: 18px; display: flex; justify-content: space-between; font-family: monospace; font-size: .55rem; letter-spacing: 1px; color: #bdc3b4; z-index: 2; }
.art-topline { top: 17px; } .art-bottomline { bottom: 17px; font-size: .47rem; }
.arena-orbit { position: absolute; width: 420px; height: 420px; border: 1px solid #515748; border-radius: 50%; top: -24px; left: calc(50% - 210px); }
.arena-orbit::after { content: ''; position: absolute; inset: 35px; border: 1px dashed #454d3d; border-radius: 50%; }
.art-grid { position: absolute; width: 258px; height: 258px; top: 62px; left: calc(50% - 129px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; transform: rotate(-12deg); animation: grid-arrive 1.2s cubic-bezier(.2,.8,.2,1) both; }
.art-cell { display: flex; align-items: center; justify-content: center; color: #717a68; background: #292f24; border: 1px solid #5d6650; font-family: sans-serif; font-size: 25px; }
.art-x { font-size: 96px; line-height: 1; font-weight: 200; background: var(--gold); color: #242b1d; border-color: var(--gold); }
.art-o i { width: 43px; height: 43px; border: 7px solid var(--red-bright); border-radius: 50%; }
.art-x:nth-child(5) { animation: mark-reveal 7s 1s infinite; }
.art-winning-line { position: absolute; width: 346px; height: 2px; background: #20241f; left: -44px; top: 129px; transform: rotate(45deg); animation: winning-line 7s 1s infinite; }
.art-stamp { position: absolute; right: 13px; bottom: 48px; padding: 13px 16px 10px; background: var(--red-bright); color: #161715; font: 2.6rem/.85 'Bebas Neue', Impact, sans-serif; transform: rotate(8deg); border: 4px solid #20241f; }
.mode-heading { display: flex; align-items: center; gap: 20px; margin-bottom: 17px; }
.mode-heading-line { flex: 1; height: 1px; background: var(--border); }
.mode-count { font-family: monospace; color: var(--text-muted); font-size: .65rem; }
#main-menu > .menu-title { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.mode-cards { flex-direction: row; gap: 12px; max-width: none; }
.mode-card { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 15px 0; text-align: left; padding: 20px 24px 24px; border-radius: 2px; background: transparent; transition: background .22s, transform .22s, border-color .22s; }
.mode-card::before { display: none; }
.mode-card:hover { transform: translateY(-5px); border-color: var(--text-muted); background: #272b24; box-shadow: none; }
#btn-mode-online { background: var(--text); border-color: var(--text); }
#btn-mode-online:hover { background: var(--gold); border-color: var(--gold); }
.mode-card-icon { grid-column: 1 / -1; width: 100%; height: auto; border: none; border-radius: 0; background: transparent; display: flex; justify-content: space-between; font: .63rem monospace; color: var(--text-muted); }
.mode-card-icon span { font-size: 1.5rem; color: var(--text); }
.mode-card-text h3 { font-size: 1.03rem; letter-spacing: -.3px; margin-bottom: 8px; }
.mode-card-text p { font-size: .71rem; line-height: 1.5; max-width: 220px; }
.mode-card-arrow { color: var(--text); align-self: center; font-size: 1.4rem; transition: transform .2s; }
.mode-card:hover .mode-card-arrow { transform: translate(3px,-3px); }
#btn-mode-online :is(h3, .mode-card-icon, .mode-card-icon span, .mode-card-arrow) { color: #1d211b; }
#btn-mode-online p { color: #4d5447; }
.dev-disclaimer-box { border: none; padding: 0; margin-top: 20px; background: transparent; text-align: left; max-width: 830px; border-radius: 0; }
.dev-disclaimer-box p { font-size: .66rem; line-height: 1.7; color: #9fa397; }
.dev-disclaimer-box strong { color: var(--text-muted); }
.arena-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0 20px; margin-top: 30px; border-top: 1px solid var(--border); font: .55rem monospace; letter-spacing: 1px; color: #a2a697; }
.screen-enter { animation: fadeUp .35s ease; }
.online-panel, .modal-box, .grid-wrapper, .player-panel { border-radius: 4px; box-shadow: none; }
.online-panel { background: var(--bg-card); }
.input-row { min-width: 0; width: 100%; }
.input-row .code-input { min-width: 0; width: 100%; }
.input-row .btn-primary { flex-shrink: 0; padding-inline: 16px; }
#online-menu .menu-header h2 { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 1.9rem; letter-spacing: 1px; }
.modal-overlay { backdrop-filter: blur(6px); }
.modal-box { border-top: 3px solid var(--red); }
.modal-title, .rules-box h2, #result-title { color: var(--text); letter-spacing: 1px; }
.btn-primary, #btn-confirm, #btn-settings-start { background: var(--red); border-radius: 3px; box-shadow: none; }
.btn-primary:hover, #btn-confirm:hover, #btn-settings-start:hover { background: var(--red-bright); }
.btn-secondary, .back-btn, .settings-select, .modal-input, .code-input, .modal-actions button, .game-controls button { border-radius: 3px; }
.settings-select option { background: #242624; }
.grid-wrapper { background: #181a17; border-color: #505447; }
.header-cell { background: #252922; border-radius: 2px; }
.cat-label { color: #c2c6b7; }
.grid-cell { background: #20251e; border-color: #484f3f; border-radius: 2px; }
.grid-cell:hover:not(.filled) { background: #313a28; border-color: var(--gold); }
.grid-cell:hover:not(.filled)::before { color: var(--gold); }
.grid-cell.player1 { background: #1f3039; }.grid-cell.player2 { background: #3b241f; }
.player-panel { background: var(--bg-card); }
.player-panel.active-player { box-shadow: none; }
@keyframes grid-arrive { from { opacity: 0; transform: translateY(28px) rotate(-20deg); } to { opacity: 1; transform: translateY(0) rotate(-12deg); } }
@keyframes mark-reveal { 0%, 15%, 95%, 100% { opacity: .3; } 25%, 85% { opacity: 1; } }
@keyframes winning-line { 0%, 28%, 95%, 100% { clip-path: inset(0 100% 0 0); } 42%, 85% { clip-path: inset(0); } }
@keyframes editorial-enter { from { transform: translateY(18px); } to { transform: translateY(0); } }
@media (min-width: 1000px) { .hero-copy { animation: editorial-enter .65s ease; } .mode-cards { animation: editorial-enter .75s ease; } }
@media (max-width: 900px) {
  .arena-hero { gap: 24px; } #arena-title { font-size: clamp(3.6rem,7.4vw,5rem); }
  .arena-art { height: 350px; } .art-grid { width: 228px; height: 228px; left: calc(50% - 114px); }
  .art-x { font-size: 80px; } .art-winning-line { width: 310px; left: -41px; top: 114px; }
  .hero-rules { gap: 12px; } .mode-card { padding: 18px; }
}
@media (max-width: 650px) {
  .site-header { padding: 17px 18px; gap: 12px; position: relative; }
  .logo-title { font-size: 1.6rem; } .logo-subtitle { display: block; font-size: .5rem; white-space: nowrap; }
  .header-actions { gap: 0; } .btn-icon { font-size: .65rem; padding: 8px; }
  #report-btn { display: inline-block; } .brand-grid { grid-template-columns: repeat(3,5px); gap: 2px; }.brand-grid i { height: 5px; }
  #main-menu.active { padding: 0 20px; }
  .arena-hero { grid-template-columns: 1fr; padding: 32px 0 28px; gap: 28px; }
  #arena-title { font-size: clamp(3.5rem,12.8vw,5.2rem); margin-top: 20px; }
  .eyebrow { font-size: .55rem; letter-spacing: 1px; }.hero-description { font-size: .85rem; }
  .hero-rules { justify-content: space-between; max-width: 380px; }
  .arena-art { height: 245px; }.art-grid { width: 174px; height: 174px; top: 35px; left: calc(50% - 87px); }
  .art-x { font-size: 62px; }.art-o i { width: 33px; height: 33px; border-width: 5px; }
  .art-winning-line { width: 232px; top: 87px; left: -29px; }.art-stamp { bottom: 35px; font-size: 2rem; }
  .arena-orbit { width: 300px; height: 300px; top: -28px; left: calc(50% - 150px); }
  .mode-cards { flex-direction: column; gap: 10px; }.mode-card { grid-template-columns: 28px 1fr auto; align-items: center; gap: 15px; padding: 19px 17px; }
  .mode-card-icon { grid-column: auto; }.mode-card-icon span { display: none; }
  .mode-card-text h3 { font-size: .95rem; margin-bottom: 4px; }.mode-card-text p { max-width: none; }
  .mode-heading { gap: 12px; }.mode-count { font-size: .55rem; }
  .arena-footer { flex-wrap: wrap; margin-top: 24px; font-size: .5rem; }.arena-footer > span:nth-child(2) { order: 3; width: 100%; }
  .modal-box { max-height: calc(100dvh - 32px); overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .art-winning-line { clip-path: inset(0); }
}
@media (max-width: 380px) {
  .site-header { padding: 15px 12px; gap: 8px; }
  .logo-area { gap: 8px; }.logo-title { font-size: 1.4rem; white-space: nowrap; }
  .btn-icon { font-size: .6rem; padding: 7px 5px; } #lang-toggle { min-width: 34px; }
}
