/* GRAND CHESS — side panel and overlays. The stage is a fixed 1920x1080 scene scaled to fit. */
:root { --gold: #e9c250; --cream: #f3e9c8; --ink: #0f0c0a; --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif; --serif: Georgia, "Times New Roman", serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: var(--font); color: var(--cream); user-select: none; -webkit-user-select: none; }
#stage { position: fixed; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%); transform-origin: center center; }
#game { position: absolute; left: 0; top: 0; display: block; touch-action: none; }

#panel { position: absolute; left: 1060px; top: 60px; width: 800px; height: 960px; display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(22,16,12,.92), rgba(10,8,6,.94)); border: 1px solid rgba(233,194,80,.35); box-shadow: 0 30px 80px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06); }
.player { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.player .who { display: flex; align-items: center; justify-content: space-between; font-size: 20px; font-weight: 600; letter-spacing: 1px; }
.clock { font-family: Consolas, "Lucida Console", monospace; font-size: 26px; color: #c9bb8f; padding: 2px 10px; border-radius: 6px; min-width: 60px; text-align: right; }
.clock.active { color: var(--gold); background: rgba(233,194,80,.12); } .clock.low { color: #ff6b6b; }
.cap { display: flex; align-items: center; gap: 2px; min-height: 26px; } .cap img { height: 26px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); } .cap b { margin-left: 8px; color: var(--gold); font-size: 14px; }
#moves { flex: 1; overflow-y: auto; padding: 8px 12px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.06); font-size: 19px; line-height: 1.7; }
#moves .row { display: grid; grid-template-columns: 56px 1fr 1fr; } #moves .n { color: #8a7f5f; } #moves .m { padding: 0 8px; border-radius: 4px; } #moves .m.cur { background: rgba(233,194,80,.22); color: #fff; }
#moves .empty { color: #6f6140; font-style: italic; }
#moves::-webkit-scrollbar { width: 8px; } #moves::-webkit-scrollbar-thumb { background: #3a3012; border-radius: 4px; }
#status { font-family: var(--serif); font-size: 24px; letter-spacing: 1px; text-align: center; color: var(--cream); min-height: 32px; }
#engine-info { text-align: center; font-size: 13px; letter-spacing: 1px; color: #8a7f5f; min-height: 18px; font-family: Consolas, monospace; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { font-family: var(--font); font-weight: 700; letter-spacing: 1.5px; font-size: 14px; cursor: pointer; border: 1px solid #6a5a2a; color: var(--cream); background: linear-gradient(180deg, #2a2834, #15141b); border-radius: 8px; padding: 0 16px; height: 42px; box-shadow: 0 3px 0 #0a0a0e, 0 6px 12px rgba(0,0,0,.5); transition: transform .06s, filter .15s; }
.btn:hover { filter: brightness(1.15); } .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a0a0e; } .btn:disabled { filter: grayscale(.6) brightness(.55); cursor: default; transform: none; }
.btn.gold { background: linear-gradient(180deg, #fff3bd, #e9c250 35%, #b8860b 80%, #8a640f); color: #2a1a00; border-color: #5a3d08; }
.btn.icon { width: 42px; padding: 0; font-size: 18px; } #btn-sound.muted { filter: grayscale(.7) brightness(.7); }
#vol { width: 110px; accent-color: var(--gold); cursor: pointer; }
.box { padding: 14px; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid rgba(233,194,80,.25); display: flex; flex-direction: column; gap: 10px; }
.box.hidden { display: none; }
.box label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; letter-spacing: 1px; color: #c9bb8f; }
.box select, .box input[type=range] { font-family: var(--font); font-size: 15px; background: #15141b; color: var(--cream); border: 1px solid #4a3b14; border-radius: 6px; padding: 6px 8px; }
.box input[type=range] { accent-color: var(--gold); width: 180px; } #level-name { min-width: 80px; text-align: right; color: var(--gold); font-weight: 700; }
#pgn-text { width: 100%; height: 150px; resize: none; font-family: Consolas, monospace; font-size: 13px; background: #0e0d12; color: #e6d7b0; border: 1px solid #4a3b14; border-radius: 6px; padding: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.fen { width: 100%; font-family: Consolas, monospace; font-size: 12px; background: rgba(0,0,0,.4); color: #8a7f5f; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; padding: 6px 8px; }

#promo, #gameover, #splash { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 20; }
#promo.hidden, #gameover.hidden, #splash.hidden { display: none; }
#promo { background: rgba(0,0,0,.45); } #promo .panel { display: flex; gap: 14px; align-items: center; padding: 22px 28px; border-radius: 16px; background: linear-gradient(180deg, #1a1830, #0a0a14); border: 2px solid #b8942c; box-shadow: 0 0 60px rgba(0,0,0,.9); }
#promo h3 { margin: 0 12px 0 0; font-family: var(--serif); letter-spacing: 2px; color: var(--gold); font-size: 22px; }
#promo button { width: 120px; height: 140px; border-radius: 12px; border: 1px solid #6a5a2a; background: rgba(255,255,255,.05); cursor: pointer; transition: transform .12s, background .2s; }
#promo button:hover { transform: translateY(-6px); background: rgba(233,194,80,.18); } #promo img { height: 120px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.7)); }
#gameover { background: rgba(0,0,0,.55); } #gameover .panel { text-align: center; padding: 34px 50px; border-radius: 18px; background: linear-gradient(180deg, #1a1830, #0a0a14); border: 3px solid #b8942c; box-shadow: 0 0 80px rgba(0,0,0,.9); }
#gameover h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 56px; letter-spacing: 4px; color: var(--gold); text-shadow: 0 0 30px rgba(233,194,80,.4); }
#gameover p { margin: 0 0 24px; font-size: 20px; letter-spacing: 1px; color: #c9bb8f; } #gameover .btn { height: 50px; font-size: 16px; }
#splash { z-index: 30; cursor: pointer; background: radial-gradient(ellipse at 50% 35%, rgba(60,40,20,.85) 0%, rgba(0,0,0,.96) 75%); }
#splash .inner { text-align: center; } #splash .title { font-family: var(--serif); font-size: 150px; letter-spacing: 18px; line-height: 1; background: linear-gradient(180deg, #fff6c8 0%, #f8d865 40%, #b8860b 52%, #f5cf4a 62%, #8a5a06 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(255,200,90,.35)) drop-shadow(0 6px 0 #2a1a02); }
#splash .sub { font-size: 18px; letter-spacing: 8px; color: #c9a84a; margin: 18px 0 50px; } #splash-text { font-size: 30px; letter-spacing: 8px; color: #ffe9a8; font-family: var(--serif); }
#splash.ready #splash-text { animation: blink 1.4s ease-in-out infinite; } @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
#splash .note { margin-top: 40px; font-size: 14px; letter-spacing: 3px; color: #6f6140; }
