@font-face{font-family:Yekan;src:url("/fonts/IRANYekanXFaNum-Regular.woff") format("woff");font-weight:400;font-display:swap}
@font-face{font-family:Yekan;src:url("/fonts/IRANYekanXFaNum-Bold.woff") format("woff");font-weight:700 900;font-display:swap}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#edf1f5;color:#26354b;font-family:Yekan,Tahoma,sans-serif;letter-spacing:0}
body{min-height:100svh;display:grid;place-items:center;padding:16px}
button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus-visible{outline:3px solid #b74e96;outline-offset:4px}
.game-shell{width:min(100%,380px);display:grid;justify-items:center;gap:14px}
.game-heading{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px}
h1{font-size:25px;margin:0;font-weight:900}.round-badge{font-size:13px;color:#63728a}.round-badge b{color:#354963}
.modes{display:flex;width:100%;padding:4px;border:1px solid #d8e0e8;border-radius:8px;box-shadow:inset 3px 3px 7px #d9dfe6,inset -3px -3px 7px #fff}
.modes button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-height:44px;border:0;border-radius:5px;color:#607086;background:transparent;font-size:14px;font-weight:700}
.modes button[aria-pressed="true"]{background:#f8fbff;color:#3168a3;box-shadow:3px 3px 7px #d2dae4,-2px -2px 6px #fff}
.scoreboard{width:100%;display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;text-align:center}
.score{display:grid;gap:3px;font-size:12px;color:#63728a}.score b{font-size:22px;line-height:1.3}.score-x b{color:#327bb6}.score-o b{color:#c75572}.score-draw b{color:#72798c}
.board{--board-size:min(312px,calc(100vw - 40px),calc(100svh - 260px));display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);width:var(--board-size);height:var(--board-size);min-width:156px;min-height:156px;gap:12px;padding:12px;border:1px solid #fff;border-radius:8px;box-shadow:9px 9px 22px #cfd7e2,-9px -9px 22px #fff}
.cell{position:relative;width:100%;height:100%;border:1px solid #f9fcff;border-radius:8px;background:#edf1f5;box-shadow:4px 4px 8px #cbd4df,-4px -4px 8px #fff;transition:box-shadow 150ms,background 150ms,transform 150ms;color:#327bb6;display:grid;place-items:center}
.cell[data-value="o"]{color:#c75572}
.cell[aria-disabled="true"]{cursor:default;box-shadow:inset 3px 3px 7px #d3dbe5,inset -3px -3px 7px #fff}
.cell.winner{background:#dceef4;border-color:#65a9bf}
.cell:active:not([aria-disabled="true"]){transform:scale(.97);box-shadow:inset 3px 3px 7px #d3dbe5,inset -3px -3px 7px #fff}
.mark{display:block;position:relative;width:48%;height:48%;animation:appear 180ms ease-out}
.mark.x:before,.mark.x:after{content:"";position:absolute;left:44%;top:-8%;width:13%;height:116%;border-radius:4px;background:currentColor;transform:rotate(45deg)}.mark.x:after{transform:rotate(-45deg)}
.mark.o{border:6px solid currentColor;border-radius:50%}
.status{min-height:26px;margin:0;font-size:15px;font-weight:700;text-align:center;line-height:1.8}
.restart{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 24px;border:1px solid #fff;border-radius:8px;color:#3e658a;background:#edf1f5;box-shadow:4px 4px 9px #d1d9e3,-4px -4px 9px #fff;font-size:14px;font-weight:700}
@media(hover:hover){.cell:not([aria-disabled="true"]):hover{background:#f9fcff;transform:translateY(-2px)}.restart:hover{background:#f9fcff}}
@media(min-width:640px) and (max-height:480px){body{padding:14px}.game-shell{width:min(96%,720px);grid-template-columns:260px 1fr;column-gap:40px;row-gap:12px}.game-heading,.modes,.scoreboard,.status,.restart{grid-column:1}.board{grid-column:2;grid-row:1/6;--board-size:min(320px,calc(100svh - 40px));align-self:center}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
@keyframes appear{from{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}
