:root { --bg: #0a3d29; --glow: #17623e; --accent: #f5c968; }
.game-area { inset: 55px 0 0; padding: clamp(8px, 1.8vw, 22px); }
.mahjong-wrap { display: grid; grid-template-rows: auto minmax(0, 1fr); place-items: center; gap: 10px; width: 100%; height: 100%; }
.timer { width: min(96%, 1120px); height: 9px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; background: rgba(1,31,18,.62); box-shadow: 0 4px 12px rgba(0,0,0,.24); }
.timer span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#fb7185,#f5c968,#86efac); transition: width .2s linear; }
.mahjong-board { display: grid; grid-template-columns: repeat(var(--cols,8),1fr); grid-template-rows: repeat(var(--rows,6),1fr); gap: clamp(5px,.75vw,9px); width: min(96%, calc((100vh - 105px) * var(--cols,8) / var(--rows,6)), 1120px); max-height: 100%; aspect-ratio: var(--cols,8)/var(--rows,6); padding: clamp(8px,1.2vw,14px); border: 2px solid rgba(245,201,104,.38); border-radius: 24px; background: radial-gradient(circle at 50% 40%,rgba(30,122,73,.92),rgba(5,62,37,.96)); box-shadow: 0 24px 68px rgba(0,0,0,.4), inset 0 0 34px rgba(0,0,0,.22); }
.tile { position: relative; display: grid; min-width: 0; min-height: 0; place-items: center; overflow: hidden; border: 1px solid rgba(111,75,38,.34); border-radius: clamp(8px,1vw,14px); background: linear-gradient(145deg,#fffaf0,#eadbb9 64%,#c9aa72) !important; color: transparent; font-size: 0; cursor: pointer; box-shadow: inset 0 0 0 3px rgba(255,255,255,.38), 0 6px 10px rgba(0,0,0,.3) !important; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.tile::before { position: absolute; inset: 10%; background: url("/images/games/assets/mahjong-connect/symbols-v1.png") var(--symbol-x,0%) var(--symbol-y,0%) / 400% 400% no-repeat; content: ""; filter: drop-shadow(0 2px 1px rgba(79,45,18,.16)); }
.tile::after { position: absolute; right: 6px; bottom: 4px; color: #9a7143; content: attr(data-mark); font-size: clamp(7px,.7vw,10px); font-weight: 900; }
.tile.selected { transform: translateY(-5px) scale(1.025); box-shadow: 0 0 0 4px #58d9ff,0 10px 18px rgba(0,0,0,.35) !important; }
.tile.hint { animation: pulse .72s ease infinite alternate; }
.tile.removed { visibility: hidden; opacity: 0; transform: scale(.3); }
@keyframes pulse { to { box-shadow: 0 0 0 4px #ffe17c,0 0 22px #ffe17c !important; } }
@media (max-width: 620px) { .game-area { inset: 88px 0 0; padding: 5px; } .mahjong-wrap { gap: 5px; } .mahjong-board { width: min(98%, calc((100vh - 125px) * var(--cols,8) / var(--rows,6))); gap: 3px; padding: 5px; border-radius: 15px; } .tile::before { inset: 6%; } .tile::after { right: 3px; bottom: 2px; } }
@media (max-height: 520px) { .game-area { inset: 49px 0 0; } .mahjong-board { width: min(94%, calc((100vh - 75px) * var(--cols,8) / var(--rows,6))); } .timer { height: 6px; } }
