/* İyiBatak - Lüks Yeşil Çuha Masa & Kart Tasarımı */
:root {
    --bg-deep: #061811;
    --bg-felt: radial-gradient(ellipse at center, #145337 0%, #0b3321 55%, #061d13 100%);
    --panel-bg: rgba(10, 31, 22, 0.86);
    --panel-border: rgba(245, 200, 92, 0.24);
    --gold: #f5c85c;
    --gold-dark: #c98f22;
    --text-main: #f3f7f4;
    --text-muted: #9ebcb0;
    --danger: #ef4444;
    --success: #22c55e;
    --card-w: 98px;
    --card-h: 140px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    background: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    user-select: none;
}

.hidden {
    display: none !important;
}

.pos { color: #4ade80; }
.neg { color: #f87171; }
.trump-red { color: #ff5c6c; font-weight: 700; }
.trump-black { color: #e2e8f0; font-weight: 700; }

/* ==================== BUTONLAR & FORMLAR ==================== */
.btn {
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.14s ease, filter 0.14s ease, background 0.14s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #1c1404;
    box-shadow: 0 4px 14px rgba(245, 200, 92, 0.28);
}

.btn-green {
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: var(--gold);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: rgba(0, 0, 0, 0.32);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.auth-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 9px 10px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.15s;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #1b1404;
    box-shadow: 0 3px 12px rgba(245, 200, 92, 0.25);
}

.welcome-bonus-banner {
    background: rgba(245, 200, 92, 0.14);
    border: 1px solid rgba(245, 200, 92, 0.4);
    color: #fef08a;
    font-size: 0.85rem;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    line-height: 1.45;
}

.chip-wallet-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chip-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 200, 92, 0.15);
    border: 1.5px solid var(--gold);
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--gold);
    font-size: 0.96rem;
}

.chip-balance-pill small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.veresiye-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fecaca;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.8rem;
}

.pot-preview-tag {
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #86efac;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.wallet-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.wallet-stat-box {
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ws-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.ws-val {
    font-size: 1.25rem;
}

.ws-val.gold {
    color: var(--gold);
}

.chip-packages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    margin-bottom: 14px;
}

.chip-pkg-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(245, 200, 92, 0.22);
    border-radius: 12px;
    padding: 12px 14px;
}

.chip-pkg-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.chip-pkg-info strong {
    color: var(--gold);
    font-size: 0.94rem;
}

.chip-pkg-info span {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.veresiye-pay-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    color: #fecaca;
    margin-bottom: 12px;
    text-align: left;
}

/* ==================== GİRİŞ EKRANI ==================== */
.center-screen {
    min-height: 100vh;
    background: var(--bg-felt);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
}

.brand-logo {
    text-align: center;
    margin-bottom: 22px;
}

.brand-logo .spade-icon {
    font-size: 3rem;
    color: var(--gold);
    display: block;
    line-height: 1;
    margin-bottom: 6px;
    text-shadow: 0 4px 20px rgba(245, 200, 92, 0.45);
}

.brand-logo h1 {
    font-size: 1.9rem;
    letter-spacing: 0.5px;
    color: var(--gold);
}

.brand-logo p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.avatar-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.avatar-opt {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1.45rem;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.15s;
}

.avatar-opt:hover {
    background: rgba(255, 255, 255, 0.12);
}

.avatar-opt.selected {
    border-color: var(--gold);
    background: rgba(245, 200, 92, 0.18);
    transform: scale(1.06);
}

/* ==================== LOBİ ==================== */
.lobby-wrap {
    min-height: 100vh;
    background: var(--bg-felt);
    padding: 20px;
}

.lobby-container {
    max-width: 1120px;
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold);
}

.player-pill {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-pill-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(245, 200, 92, 0.16);
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.player-pill-name {
    font-weight: 700;
    font-size: 1rem;
}

.player-pill-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lobby-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-header h2 {
    font-size: 1.15rem;
    color: var(--gold);
}

.single-box {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.single-box select {
    width: auto;
    min-width: 140px;
}

.inline-form {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.inline-form input {
    flex: 1;
}

.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 310px;
    overflow-y: auto;
}

.room-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.room-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.room-code-pill {
    font-family: monospace;
    font-size: 0.8rem;
    background: rgba(245, 200, 92, 0.16);
    color: var(--gold);
    padding: 2px 7px;
    border-radius: 6px;
}

.room-item-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot-green { background: #22c55e; }
.dot-gold { background: #f5c85c; }

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 20px 10px;
    font-size: 0.9rem;
}

/* Liderlik Tablosu */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 9px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.82rem;
}

.rank-cell {
    width: 36px;
    text-align: center !important;
    font-weight: 700;
}

.score-cell {
    font-weight: 700;
}

/* ==================== BEKLEME ODASI ==================== */
.waiting-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 28px;
    max-width: 620px;
    width: 100%;
    text-align: center;
}

.code-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed var(--gold);
    padding: 10px 18px;
    border-radius: 12px;
    margin: 14px 0 20px;
}

.code-banner strong {
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: var(--gold);
}

.waiting-seats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.waiting-seat {
    padding: 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.waiting-seat.filled {
    border-color: rgba(245, 200, 92, 0.45);
    background: rgba(245, 200, 92, 0.08);
}

.ws-avatar { font-size: 2rem; margin-bottom: 4px; }
.ws-name { font-weight: 700; }
.ws-tag { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.waiting-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== OYUN MASASI ==================== */
.game-screen {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background: var(--bg-felt);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.game-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(5, 18, 12, 0.82);
    border-bottom: 1px solid var(--panel-border);
    z-index: 20;
}

.hud-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hud-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
}

.hud-pill.gold {
    border-color: rgba(245, 200, 92, 0.45);
    color: var(--gold);
}

.table-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.table-felt-ring {
    position: absolute;
    width: min(760px, 88vw);
    height: min(420px, 58vh);
    border-radius: 220px;
    border: 3px solid rgba(245, 200, 92, 0.16);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.32);
    pointer-events: none;
}

/* ==================== BATAK HD MASA, 5 LÜKS TEMA & AHŞAP PLAKALAR ==================== */
.game-screen,
.game-screen.theme-emerald {
    --wood-bg:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0px, rgba(0, 0, 0, 0.14) 2px, transparent 2px, transparent 7px),
        linear-gradient(180deg, #63240d 0%, #3f1506 55%, #270b02 100%);
    --wood-trim: #d9a12b;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background:
        repeating-radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.07) 0px, rgba(0, 0, 0, 0.07) 3px, transparent 3px, transparent 9px),
        radial-gradient(ellipse at 50% 45%, #1f7831 0%, #11511e 56%, #07280d 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.game-screen.theme-royal,
.game-screen.theme-blue {
    --wood-bg:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0px, rgba(0, 0, 0, 0.16) 2px, transparent 2px, transparent 7px),
        linear-gradient(180deg, #3e2b1d 0%, #271a11 55%, #170f09 100%);
    --wood-trim: #e2b857;
    background:
        repeating-radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.08) 0px, rgba(0, 0, 0, 0.08) 3px, transparent 3px, transparent 9px),
        radial-gradient(ellipse at 50% 45%, #1d5685 0%, #0f3357 56%, #06182c 100%);
}

.game-screen.theme-bordeaux {
    --wood-bg:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0px, rgba(0, 0, 0, 0.18) 2px, transparent 2px, transparent 7px),
        linear-gradient(180deg, #2e181d 0%, #1d0e11 55%, #110709 100%);
    --wood-trim: #f0c05a;
    background:
        repeating-radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.08) 0px, rgba(0, 0, 0, 0.08) 3px, transparent 3px, transparent 9px),
        radial-gradient(ellipse at 50% 45%, #7c1f30 0%, #4d101b 56%, #24060c 100%);
}

.game-screen.theme-obsidian {
    --wood-bg:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 8px),
        linear-gradient(180deg, #272a30 0%, #17191d 55%, #0d0e11 100%);
    --wood-trim: #f5c85c;
    background:
        repeating-radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 3px, transparent 3px, transparent 9px),
        radial-gradient(ellipse at 50% 45%, #28313b 0%, #161c22 56%, #0a0d10 100%);
}

.game-screen.theme-ottoman {
    --wood-bg:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0px, rgba(0, 0, 0, 0.14) 2px, transparent 2px, transparent 7px),
        linear-gradient(180deg, #683b14 0%, #44250a 55%, #291504 100%);
    --wood-trim: #eab308;
    background:
        repeating-radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.07) 0px, rgba(0, 0, 0, 0.07) 3px, transparent 3px, transparent 9px),
        radial-gradient(ellipse at 50% 45%, #4a5d23 0%, #2e3b14 56%, #182009 100%);
}

body.theme-royal { --bg-felt: radial-gradient(ellipse at center, #1d5685 0%, #0f3357 56%, #06182c 100%); }
body.theme-bordeaux { --bg-felt: radial-gradient(ellipse at center, #7c1f30 0%, #4d101b 56%, #24060c 100%); }
body.theme-obsidian { --bg-felt: radial-gradient(ellipse at center, #28313b 0%, #161c22 56%, #0a0d10 100%); }
body.theme-ottoman { --bg-felt: radial-gradient(ellipse at center, #4a5d23 0%, #2e3b14 56%, #182009 100%); }

.game-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(4, 18, 9, 0.65);
    border-bottom: 1px solid rgba(212, 155, 39, 0.25);
    z-index: 20;
}

.hud-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hud-pill {
    background: rgba(0, 0, 0, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.hud-pill.gold {
    border-color: rgba(245, 200, 92, 0.48);
    color: var(--gold);
}

.table-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.table-felt-ring {
    position: absolute;
    width: min(820px, 92vw);
    height: min(460px, 70vh);
    border-radius: 50%;
    border: 2px solid rgba(245, 200, 92, 0.14);
    box-shadow:
        inset 0 0 90px rgba(0, 0, 0, 0.34),
        0 0 0 8px rgba(245, 200, 92, 0.04);
    pointer-events: none;
}

.table-club-crest {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    opacity: 0.14;
    z-index: 2;
}

.crest-suits {
    font-size: 1.45rem;
    letter-spacing: 8px;
    color: var(--gold);
}

.crest-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #ffffff;
    line-height: 1.1;
}

.crest-sub {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--gold);
    margin-top: 2px;
}

.table-status-banner {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(245, 200, 92, 0.28);
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #e2e8f0;
    z-index: 15;
    white-space: nowrap;
    max-width: 82vw;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

/* 4 Ahşap Trapez Oyuncu Plakası (Resim 1 & 2 Birebir Tasarım) */
.seat {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 14;
}

.wood-plaque {
    background: var(--wood-bg, linear-gradient(180deg, #5e220c 0%, #3d1406 55%, #270b02 100%));
    border: 2.5px solid var(--wood-trim, #c99322);
    color: #e5e7eb;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55), inset 0 1px 4px rgba(255, 200, 100, 0.25);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wood-plaque.dummy-plaque {
    border-style: dashed;
    opacity: 0.88;
}

.playing-card.bury-selected {
    transform: translateY(calc(var(--fan-y, 0px) - 18px)) rotate(var(--fan-rot, 0deg)) !important;
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.75) !important;
}

.seat.active-turn .wood-plaque {
    border-color: #ffd54f;
    box-shadow: 0 0 22px rgba(255, 213, 79, 0.6), inset 0 1px 6px rgba(255, 230, 140, 0.35);
}

.plaque-name {
    color: #d1d5db;
}

.plaque-score {
    color: #ffffff;
    font-weight: 800;
}

.turn-arrow {
    color: #f59e0b;
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    transition: opacity 0.2s;
}

.turn-arrow.visible {
    opacity: 1;
}

/* Üst Plaka (ECE 0) */
.seat-pos-2 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column-reverse;
}

.seat-pos-2 .wood-plaque {
    min-width: 210px;
    height: 44px;
    padding: 0 26px;
    border-top: none;
    border-radius: 0 0 18px 18px;
    transform: perspective(120px) rotateX(-12deg);
}

/* Sol Plaka (BORA 0 - Dikey Kenar) */
.seat-pos-3 {
    left: 0;
    top: 46%;
    transform: translateY(-50%);
    flex-direction: row-reverse;
}

.seat-pos-3 .wood-plaque {
    width: 44px;
    min-height: 190px;
    padding: 20px 0;
    border-left: none;
    border-radius: 0 18px 18px 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.seat-pos-3 .plaque-name,
.seat-pos-3 .plaque-score {
    transform: rotate(180deg);
}

/* Sağ Plaka (EROL 0 - Dikey Kenar) */
.seat-pos-1 {
    right: 0;
    top: 46%;
    transform: translateY(-50%);
    flex-direction: row;
}

.seat-pos-1 .wood-plaque {
    width: 44px;
    min-height: 190px;
    padding: 20px 0;
    border-right: none;
    border-radius: 18px 0 0 18px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Alt Plaka (SİZ 0 - Kartların Hemen Üstünde) */
.seat-pos-0 {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.seat-pos-0 .wood-plaque {
    min-width: 250px;
    height: 44px;
    padding: 0 32px;
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    transform: perspective(120px) rotateX(12deg);
}

/* Sol Alt El Sayacı (1/5) + Koz Rozeti ve Sağ Alt Ayarlar Çarkı (⚙️) */
.table-bottom-left-info {
    position: absolute;
    bottom: 22px;
    left: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 15;
}

.table-round-badge {
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.table-trump-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(165deg, #f3ead6 0%, #e9dec4 100%);
    border: 1.5px solid #d49b27;
    border-radius: 8px;
    padding: 2px 8px;
    font-weight: 800;
    font-size: 0.84rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.table-trump-badge.suit-red {
    color: #b3343a;
}

.table-trump-badge.suit-black {
    color: #2b2f36;
}

.table-trump-badge .tt-sym {
    font-size: 1.05rem;
    line-height: 1;
}

.table-gear-btn {
    position: absolute;
    bottom: 16px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 42, 24, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.22);
    color: #cbd5e1;
    font-size: 1.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 22;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, border-color 0.2s;
}

.table-gear-btn:hover {
    transform: rotate(35deg) scale(1.06);
    border-color: var(--gold);
    color: #fff;
}

.table-eye-btn {
    position: absolute;
    bottom: 16px;
    right: 70px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 42, 24, 0.85);
    border: 2px solid rgba(245, 200, 92, 0.4);
    color: var(--gold);
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 22;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.table-eye-btn:hover,
.table-eye-btn.tracker-active {
    border-color: var(--gold);
    background: rgba(245, 200, 92, 0.22);
    transform: scale(1.06);
}

/* Lobi Güçlendirme (4 As & Çıkan Kartları Gör) Seçenekleri */
.powerup-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.powerup-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(245, 200, 92, 0.25);
    border-radius: 10px;
    padding: 9px 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.powerup-opt:hover {
    border-color: var(--gold);
    background: rgba(245, 200, 92, 0.08);
}

.powerup-opt input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
}

.pu-icon {
    font-size: 1.4rem;
}

.pu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pu-text strong {
    font-size: 0.88rem;
    color: #f8fafc;
}

.pu-text small {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.pu-price {
    color: var(--gold);
    font-size: 0.86rem;
    white-space: nowrap;
}

.pu-total {
    text-align: right;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--gold);
    padding-top: 2px;
}

/* Oyun İçi Çıkan Kartları Gör Paneli */
.tracker-panel {
    position: absolute;
    bottom: 68px;
    right: 16px;
    width: min(370px, 92vw);
    background: rgba(14, 28, 20, 0.96);
    border: 1.5px solid var(--gold);
    border-radius: 14px;
    padding: 10px 12px;
    z-index: 28;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.tracker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 0.86rem;
}

.tracker-close {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fecaca;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-weight: 800;
}

.tracker-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tracker-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.28);
    padding: 4px 6px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.tracker-row.is-trump {
    border-color: rgba(245, 200, 92, 0.45);
    background: rgba(245, 200, 92, 0.08);
}

.tr-suit {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
}

.tr-suit.suit-red { color: #e05258; }
.tr-suit.suit-black { color: #e2e8f0; }

.tr-cells {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 2px;
}

.tc {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 0;
    border-radius: 4px;
    line-height: 1;
}

.tc-played {
    background: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
    text-decoration: line-through;
    opacity: 0.65;
}

.tc-mine {
    background: rgba(34, 197, 94, 0.28);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.55);
}

.tc-out {
    background: rgba(243, 234, 214, 0.9);
    color: #1f2937;
}

.tr-count {
    font-size: 0.72rem;
    color: var(--gold);
    font-weight: 700;
    width: 18px;
    text-align: right;
}

.tracker-legend {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 7px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.tracker-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tracker-legend .lg {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.lg-played { background: rgba(239, 68, 68, 0.5); }
.lg-mine { background: rgba(34, 197, 94, 0.65); }
.lg-out { background: #f3ead6; }

.seat-bubble {
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.seat-bubble.gold {
    background: var(--gold);
    color: #1b1404;
    border-color: transparent;
}

/* Ortadaki Trick (Löve) Alanı */
.trick-area {
    position: relative;
    width: 280px;
    height: 224px;
    z-index: 10;
}

.trick-card-slot {
    position: absolute;
    transition: transform 0.25s ease;
    animation: cardDrop 0.22s ease-out;
}

.trick-card-slot.pos-0 { bottom: 0; left: 50%; transform: translateX(-50%); }
.trick-card-slot.pos-2 { top: 0; left: 50%; transform: translateX(-50%); }
.trick-card-slot.pos-1 { right: 0; top: 50%; transform: translateY(-50%); }
.trick-card-slot.pos-3 { left: 0; top: 50%; transform: translateY(-50%); }

.trick-winner-glow .playing-card {
    box-shadow: 0 0 24px 4px rgba(245, 200, 92, 0.85);
    border-color: var(--gold);
}

@keyframes cardDrop {
    from { opacity: 0; scale: 0.82; }
    to { opacity: 1; scale: 1; }
}

/* ==================== İSKAMBİL KARTI (BATAK HD STİLİ) ==================== */
.playing-card {
    width: var(--card-w);
    height: var(--card-h);
    background: linear-gradient(165deg, #f3ead6 0%, #e9dec4 100%);
    border-radius: 9px;
    border: 1.5px solid #c9b994;
    box-shadow: -2px 4px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.playing-card.suit-red { color: #b3343a; }
.playing-card.suit-black { color: #2b2f36; }

.card-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.95;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    z-index: 3;
    background: rgba(243, 234, 214, 0.92);
    padding: 1px 2px;
    border-radius: 4px;
}

.card-corner.top-left { top: 4px; left: 5px; }
.card-corner.bottom-right { bottom: 4px; right: 5px; transform: rotate(180deg); }

.card-rank { font-size: 1.5rem; letter-spacing: -0.5px; }
.card-suit-sm { font-size: 1.2rem; margin-top: 1px; }
.card-center {
    font-size: 2.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.card-court-center,
.card-ace-center {
    padding: 8px 5px 5px 16px;
}

.court-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.playing-card.card-court {
    background: linear-gradient(165deg, #f1e6cc 0%, #e6d8b8 100%);
}

/* ==================== 2 SIRA KAVİSLİ YELPAZE EL & ALT AHŞAP RAF ==================== */
.hand-dock {
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 18;
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0px, rgba(0, 0, 0, 0.15) 2px, transparent 2px, transparent 8px),
        linear-gradient(180deg, #521d0a 0%, #371205 40%, #220a02 100%);
    border-top: 3px solid #7c3515;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.6);
}

.player-hand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding-top: 10px;
    max-width: 100%;
}

.hand-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

.hand-row-top {
    z-index: 1;
}

.hand-row-top:hover {
    z-index: 4;
}

.hand-row-bottom {
    z-index: 2;
    margin-top: -32px;
}

.hand-row .playing-card {
    margin-left: -10px;
    cursor: pointer;
    transform: translateY(var(--fan-y, 0px)) rotate(var(--fan-rot, 0deg));
    transform-origin: bottom center;
}

.hand-row .playing-card:first-child {
    margin-left: 0;
}

.hand-row .playing-card.playable {
    transform: translateY(calc(var(--fan-y, 0px) - 8px)) rotate(var(--fan-rot, 0deg));
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(245, 200, 92, 0.42);
}

.hand-row .playing-card.playable:hover {
    transform: translateY(calc(var(--fan-y, 0px) - 20px)) rotate(var(--fan-rot, 0deg)) scale(1.06);
    z-index: 30;
}

.hand-row .playing-card.dimmed {
    filter: brightness(0.68) saturate(0.75);
    cursor: not-allowed;
}

/* Alt Ahşap Bar (Batak HD Filigranlı) */
.wood-bottom-bar {
    width: 100%;
    height: 44px;
    margin-top: -14px;
    z-index: 5;
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0px, rgba(0, 0, 0, 0.16) 3px, transparent 3px, transparent 9px),
        linear-gradient(180deg, #3c1406 0%, #240b02 100%);
    border-top: 1px solid rgba(255, 190, 90, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.55);
}

.wood-watermark {
    font-family: 'Arial Black', Impact, system-ui, sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.13);
    letter-spacing: 1px;
    pointer-events: none;
}

/* Hızlı Sohbet Barı */
.chat-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 4px;
}

.chat-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    cursor: pointer;
}

.chat-chip:hover {
    background: rgba(245, 200, 92, 0.22);
    border-color: var(--gold);
}

/* ==================== 3x3 ALTIN İHALE TUŞ TAKIMI + PAS (RESİM 2) ==================== */
.table-center-prompt {
    position: absolute;
    top: 47%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    width: min(310px, 84vw);
    pointer-events: auto;
}

.hd-keypad-box {
    background: rgba(34, 34, 34, 0.96);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72), inset 0 1px 1px rgba(255, 255, 255, 0.12);
    text-align: center;
}

.hd-keypad-sub {
    color: #d4d4d8;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.hd-bid-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.hd-bid-btn,
.hd-pas-btn {
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffca28 0%, #f59e0b 48%, #d97706 52%, #b45309 100%);
    box-shadow: 0 5px 0 #6b2f06, 0 8px 16px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.55);
    color: #111111;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, filter 0.1s;
}

.hd-bid-btn {
    height: 58px;
    font-size: 1.75rem;
}

.hd-pas-btn {
    width: 100%;
    height: 56px;
    font-size: 1.7rem;
    letter-spacing: 1px;
}

.hd-aces-btn {
    width: 100%;
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1.5px solid rgba(245, 200, 92, 0.55);
    background: rgba(245, 200, 92, 0.14);
    color: #fde68a;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}

.hd-aces-btn:hover:not(:disabled) {
    background: rgba(245, 200, 92, 0.26);
    transform: translateY(-1px);
}

.hd-aces-btn:disabled {
    opacity: 0.65;
    border-color: rgba(34, 197, 94, 0.55);
    color: #86efac;
    cursor: default;
}

.hd-bid-btn:hover:not(:disabled),
.hd-pas-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}

.hd-bid-btn:active:not(:disabled),
.hd-pas-btn:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #6b2f06, 0 4px 8px rgba(0, 0, 0, 0.4);
}

.hd-bid-btn:disabled {
    opacity: 0.32;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.hd-trump-btn {
    background: linear-gradient(180deg, #ffca28 0%, #f59e0b 48%, #d97706 52%, #b45309 100%);
    box-shadow: 0 4px 0 #6b2f06, 0 6px 14px rgba(0, 0, 0, 0.4);
    color: #111;
    border: none;
}

.hd-trump-btn.red {
    color: #b91c1c;
}

/* ==================== BATAK HD AYARLAR & MOD MENÜSÜ (RESİM 1) ==================== */
.hd-menu-card {
    position: relative;
    background: rgba(34, 34, 34, 0.96);
    border-radius: 22px;
    padding: 22px 24px;
    width: min(350px, 88vw);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78);
}

.hd-close-x {
    position: absolute;
    top: -14px;
    right: -10px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(180deg, #ff4b4b 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd-close-x:hover {
    filter: brightness(1.1);
}

.hd-menu-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.hd-pill-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hd-pill {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s, filter 0.12s;
}

.hd-pill:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.hd-pill:active {
    transform: translateY(1px);
}

.hd-pill-green {
    background: #00d455;
    color: #072912;
}

.hd-pill-white {
    background: #f4f4f5;
    color: #16a34a;
}

.hd-pill-red {
    background: #9f3a3a;
    color: #f8fafc;
}

.hd-pill-blue {
    background: #3b5998;
    color: #f8fafc;
}

.hd-pill-gold {
    background: linear-gradient(135deg, #f5c85c, #c98f22);
    color: #1b1404;
    font-size: 0.82rem;
}

.trump-count-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.35);
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 99px;
    margin-left: 6px;
}

.table-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 10, 7, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
    backdrop-filter: blur(4px);
}

.overlay-card {
    background: #0d2b1f;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    padding: 24px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.6);
}

.overlay-card h3 {
    color: var(--gold);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.overlay-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.bid-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.bid-num-btn {
    min-width: 48px;
}

.trump-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.trump-btn {
    padding: 16px;
    font-size: 1.15rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.15s;
}

.trump-btn:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    background: rgba(245, 200, 92, 0.16);
}

.trump-btn.red { color: #ff6b7a; }

.row-busted {
    background: rgba(239, 68, 68, 0.12);
}

.mini-tag {
    font-size: 0.72rem;
    background: var(--gold);
    color: #1b1404;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 700;
    margin-left: 4px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
    flex-wrap: wrap;
}

.rules-list {
    text-align: left;
    color: #d6e6de;
    font-size: 0.9rem;
    line-height: 1.55;
    padding-left: 18px;
    max-height: 55vh;
    overflow-y: auto;
}

.rules-list li {
    margin-bottom: 8px;
}

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    border-left: 4px solid var(--gold);
    font-size: 0.88rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    max-width: 340px;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { border-left-color: var(--danger); }
.toast-chat { border-left-color: #38bdf8; }

/* ==================== MOBİL & TABLET UYUM ==================== */
.btn,
.playing-card,
.avatar-opt,
.trump-btn,
.chat-chip {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (max-width: 820px) {
    .lobby-grid {
        grid-template-columns: 1fr;
    }

    :root {
        --card-w: 82px;
        --card-h: 118px;
    }
}

/* Akıllı Telefon (Dikey / Portrait - Batak HD Birebir Görünüm) */
@media (max-width: 600px) {
    :root {
        --card-w: 72px;
        --card-h: 104px;
    }

    /* Giriş & Lobi */
    .center-screen {
        padding: 12px;
        min-height: 100dvh;
    }

    .auth-card {
        padding: 22px 16px;
        border-radius: 16px;
    }

    .brand-logo .spade-icon { font-size: 2.4rem; }
    .brand-logo h1 { font-size: 1.55rem; }

    .lobby-wrap {
        padding: 10px;
        min-height: 100dvh;
    }

    .topbar {
        padding: 10px 12px;
        gap: 8px;
    }

    .topbar-brand {
        font-size: 1.15rem;
    }

    .player-pill-avatar {
        width: 34px;
        height: 34px;
        font-size: 1.15rem;
    }

    .player-pill-name { font-size: 0.92rem; }
    .player-pill-stats { font-size: 0.74rem; }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-actions .btn {
        flex: 1;
        padding: 7px 8px;
        font-size: 0.78rem;
    }

    .panel {
        padding: 14px;
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .single-box select {
        flex: 1;
        min-width: 120px;
    }

    .single-box .btn {
        flex: 1;
    }

    .inline-form {
        flex-wrap: wrap;
    }

    #create-room-form input[type="text"] {
        flex: 1 1 100%;
    }

    #create-room-form select,
    #create-room-form button {
        flex: 1;
    }

    .room-item {
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    /* Bekleme Odası */
    .waiting-card {
        padding: 18px 14px;
    }

    .waiting-seats {
        gap: 8px;
    }

    .waiting-seat {
        padding: 10px 8px;
    }

    .ws-avatar { font-size: 1.5rem; }
    .ws-name { font-size: 0.86rem; }

    /* Oyun Masası HUD */
    .game-hud {
        padding: 4px 8px;
        gap: 4px;
    }

    .hud-group {
        gap: 4px;
    }

    .hud-pill {
        padding: 2px 7px;
        font-size: 0.72rem;
    }

    .game-hud .btn-sm {
        padding: 3px 8px;
        font-size: 0.72rem;
    }

    /* Batak HD 4 Ahşap Trapez Plaka (Kenarlara Yapışık) */
    .table-status-banner {
        top: 46px;
        font-size: 0.72rem;
        padding: 3px 10px;
        max-width: 74vw;
    }

    /* Üst Ahşap Plaka (ECE 0) */
    .seat-pos-2 {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .seat-pos-2 .wood-plaque {
        min-width: 176px;
        height: 38px;
        font-size: 0.85rem;
    }

    /* Sol Dikey Ahşap Plaka (BORA 0) */
    .seat-pos-3 {
        left: 0;
        top: 45%;
        transform: translateY(-50%);
    }

    .seat-pos-3 .wood-plaque {
        width: 36px;
        min-height: 158px;
        font-size: 0.82rem;
    }

    /* Sağ Dikey Ahşap Plaka (EROL 0) */
    .seat-pos-1 {
        right: 0;
        top: 45%;
        transform: translateY(-50%);
    }

    .seat-pos-1 .wood-plaque {
        width: 36px;
        min-height: 158px;
        font-size: 0.82rem;
    }

    /* Alt Ahşap Plaka (SİZ 0) */
    .seat-pos-0 {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .seat-pos-0 .wood-plaque {
        min-width: 205px;
        height: 38px;
        font-size: 0.85rem;
    }

    .table-bottom-left-info {
        bottom: 12px;
        left: 10px;
        gap: 6px;
    }

    .table-round-badge {
        font-size: 0.85rem;
    }

    .table-trump-badge {
        padding: 1px 6px;
        font-size: 0.75rem;
    }

    .table-trump-badge .tt-sym {
        font-size: 0.92rem;
    }

    .table-gear-btn {
        bottom: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 1.35rem;
    }

    .table-eye-btn {
        bottom: 10px;
        right: 54px;
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .tracker-panel {
        bottom: 54px;
        right: 8px;
        left: 8px;
        width: auto;
    }

    /* Ortada Atılan 4 Kart (Trick Area) */
    .trick-area {
        width: 206px;
        height: 174px;
    }

    /* 3x3 Altın İhale Tuş Takımı + PAS (Masa Ortasında) */
    .table-center-prompt {
        top: 46%;
        width: min(264px, 72vw);
    }

    .hd-keypad-box {
        padding: 14px;
        border-radius: 18px;
    }

    .hd-bid-grid {
        gap: 10px;
        margin-bottom: 10px;
    }

    .hd-bid-btn {
        height: 50px;
        font-size: 1.55rem;
    }

    .hd-pas-btn {
        height: 48px;
        font-size: 1.5rem;
    }

    /* Alt 2 Sıra Yelpaze El + Batak HD Ahşap Raf */
    .hand-dock {
        padding: 0;
        gap: 0;
    }

    .player-hand {
        width: 100%;
        padding-top: 8px;
        padding-bottom: 0;
        overflow: visible;
    }

    .hand-row-bottom {
        margin-top: -28px;
    }

    .hand-row .playing-card {
        margin-left: min(-8px, calc((98vw - var(--card-w)) / max(1, var(--row-total, 7) - 1) - var(--card-w)));
        border-radius: 9px;
        transform: translateY(var(--fan-y, 0px)) rotate(var(--fan-rot, 0deg));
    }

    .hand-row .playing-card:first-child {
        margin-left: 0;
    }

    .hand-row .playing-card.playable {
        transform: translateY(calc(var(--fan-y, 0px) - 8px)) rotate(var(--fan-rot, 0deg));
    }

    .wood-bottom-bar {
        height: max(38px, calc(28px + env(safe-area-inset-bottom)));
        margin-top: -12px;
    }

    .wood-watermark {
        font-size: 1.35rem;
    }

    .card-corner.top-left { top: 4px; left: 5px; }
    .card-corner.bottom-right { bottom: 4px; right: 5px; }
    .card-rank { font-size: 1.32rem; }
    .card-suit-sm { font-size: 1.05rem; }
    .card-center { font-size: 2.15rem; }
    .card-court-center, .card-ace-center { padding: 7px 4px 4px 15px; }

    .chat-bar {
        gap: 4px;
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 4px 6px 0;
    }

    .chat-chip {
        white-space: nowrap;
        font-size: 0.72rem;
        padding: 3px 8px;
    }

    /* Modallar ve Tablolar */
    .overlay-card {
        padding: 16px 12px;
        max-height: 88dvh;
        overflow-y: auto;
    }

    .data-table {
        font-size: 0.78rem;
    }

    .data-table th,
    .data-table td {
        padding: 7px 5px;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .toast {
        max-width: none;
        font-size: 0.82rem;
    }
}

/* Yatay Mobil (Landscape) */
@media (max-height: 520px) and (orientation: landscape) {
    :root {
        --card-w: 62px;
        --card-h: 90px;
    }

    .game-hud {
        padding: 3px 10px;
    }

    .hud-pill {
        padding: 2px 8px;
        font-size: 0.7rem;
    }

    .seat-pos-2 .wood-plaque,
    .seat-pos-0 .wood-plaque {
        height: 28px;
        min-width: 150px;
        font-size: 0.75rem;
    }

    .seat-pos-3 .wood-plaque,
    .seat-pos-1 .wood-plaque {
        width: 30px;
        min-height: 110px;
        font-size: 0.75rem;
    }

    .trick-area {
        width: 150px;
        height: 110px;
    }

    .wood-bottom-bar {
        height: 24px;
    }
}
