Commit 5cc54bf7 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: backgammon board fills viewport on desktop

- Board height: calc(100vh - 180px) — uses full screen height
- Layout height: calc(100vh - 70px) with overflow hidden
- Removed max-width constraint, now aspect-ratio + height drive size
- Board dominates viewport instead of floating in a small box
- Large screens: max-height 750px
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 021374f5
...@@ -24,14 +24,15 @@ ...@@ -24,14 +24,15 @@
/* ─── Game Layout ────────────────────────────────────────────────────────── */ /* ─── Game Layout ────────────────────────────────────────────────────────── */
.bg-layout { .bg-layout {
display: flex; display: flex;
gap: 20px; gap: 16px;
justify-content: center; justify-content: center;
align-items: flex-start; align-items: stretch;
max-width: 1200px; max-width: 100%;
margin: 0 auto; margin: 0 auto;
padding: 12px; padding: 8px 12px;
direction: ltr; direction: ltr;
min-height: calc(100vh - 80px); height: calc(100vh - 70px);
overflow: hidden;
} }
.bg-board-column { .bg-board-column {
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
align-items: center; align-items: center;
justify-content: center;
flex: 1; flex: 1;
min-width: 0; min-width: 0;
} }
...@@ -46,9 +48,10 @@ ...@@ -46,9 +48,10 @@
/* ─── Board Frame ────────────────────────────────────────────────────────── */ /* ─── Board Frame ────────────────────────────────────────────────────────── */
.bg-board { .bg-board {
position: relative; position: relative;
width: 100%; width: auto;
max-width: min(780px, calc(100vh - 160px)); height: calc(100vh - 180px);
aspect-ratio: 1.2 / 1; max-height: 700px;
aspect-ratio: 1.35 / 1;
background: var(--bg-board-wood); background: var(--bg-board-wood);
border-width: 10px; border-width: 10px;
border-style: solid; border-style: solid;
...@@ -720,7 +723,6 @@ ...@@ -720,7 +723,6 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
width: 100%; width: 100%;
max-width: min(780px, calc(100vh - 160px));
gap: 12px; gap: 12px;
} }
...@@ -998,7 +1000,8 @@ ...@@ -998,7 +1000,8 @@
/* ─── Responsive: Large screens ──────────────────────────────────────────── */ /* ─── Responsive: Large screens ──────────────────────────────────────────── */
@media (min-width: 1024px) { @media (min-width: 1024px) {
.bg-board { .bg-board {
max-width: min(780px, calc(100vh - 140px)); height: calc(100vh - 150px);
max-height: 750px;
} }
:root { :root {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment