/* =============================================
   RESET & TEMEL DEÃ„ÂÃ„Â°Ã…ÂKENLER
============================================= */
:root {
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --border-color: #334155;

    --wood-light: #8B4513;
    --wood-dark: #3e1f08;
    --wood-border: #2c1605;

    --felt-green: #064e3b;
    --felt-green-light: #047857;

    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --warning-hover: #d97706;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --tile-bg: linear-gradient(135deg, #fffdf2 0%, #e8e3d5 100%);
    --tile-border: #d4cfc1;
    --tile-shadow: #b5b0a1;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: url('okeywp.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    min-height: 100vh;
    font-size: 14px;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* =============================================
   ORTAK BÃ„Â°LEÃ…ÂENLER
============================================= */
.glass-panel {
    background-color: #1e293b;
    /* Okey dark panel bg */
    padding: clamp(20px, 4vw, 40px);
    /* Responsive padding */
    border-radius: 8px;
    /* Slightly rounded blocky */
    box-shadow:
        inset 4px 4px 0 rgba(255, 255, 255, 0.1),
        inset -6px -6px 0 rgba(0, 0, 0, 0.5),
        8px 8px 0 rgba(0, 0, 0, 0.6);
    border: 4px solid #334155;
    text-align: center;
    width: 95%;
    /* Responsive width */
    max-width: 500px;
    position: relative;
    color: #e2e8f0;
}

/* Metal kÃƒÂ¶Ã…Å¸eler efekti (Papazkimde'den) */
.glass-panel::before,
.glass-panel::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #64748b;
    border: 2px solid #0f172a;
    box-shadow: inset 2px 2px 0 #94a3b8;
}

.glass-panel::before {
    top: -2px;
    left: -2px;
}

.glass-panel::after {
    bottom: -2px;
    right: -2px;
}

.game-title {
    font-size: clamp(28px, 6vw, 40px);
    font-weight: 800;
    color: #fbbf24;
    /* Okey Gold */
    text-shadow: 2px 2px 0 #000, 4px 4px 0 rgba(245, 158, 11, 0.4);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.status-text {
    color: #94a3b8;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 500;
    margin-bottom: 24px;
}

.info-badge {
    color: var(--warning);
    font-weight: 600;
    margin-bottom: 24px;
    font-size: clamp(12px, 2.5vw, 14px);
}

/* Butonlar - Papazkimde 3D Blocky TarzÃ„Â± */
.action-btn {
    font-family: 'Inter', sans-serif;
    color: white;
    border: 4px solid #0f172a;
    padding: clamp(12px, 3vw, 15px);
    border-radius: 0;
    /* Blocky */
    cursor: pointer;
    width: 100%;
    font-size: clamp(14px, 3vw, 18px);
    font-weight: 800;
    text-transform: uppercase;
    transition: transform 0.1s;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
    box-shadow: none !important;
    transform: none !important;
}

/* Renk VaryasyonlarÃ„Â± (Okey Renkleri ile) */
.action-btn.primary {
    background-color: var(--success);
    box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.3), inset -4px -4px 0 rgba(0, 0, 0, 0.3);
}

.action-btn.primary:hover:not(:disabled) {
    background-color: var(--success-hover);
}

.action-btn.primary:active:not(:disabled) {
    box-shadow: inset 4px 4px 0 rgba(0, 0, 0, 0.4);
    transform: translateY(4px);
}

.action-btn.danger {
    background-color: var(--danger);
    box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.3), inset -4px -4px 0 rgba(0, 0, 0, 0.3);
}

.action-btn.danger:hover:not(:disabled) {
    background-color: var(--danger-hover);
}

.action-btn.danger:active:not(:disabled) {
    box-shadow: inset 4px 4px 0 rgba(0, 0, 0, 0.4);
    transform: translateY(4px);
}

.action-btn.btn-gold {
    background-color: #d97706;
    /* Okey Base Gold */
    box-shadow: inset 4px 4px 0 rgba(255, 215, 0, 0.4), inset -4px -4px 0 rgba(0, 0, 0, 0.4);
    border: 4px solid #451a03;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
}

.action-btn.btn-gold:hover:not(:disabled) {
    background-color: #b45309;
}

.action-btn.btn-gold:active:not(:disabled) {
    box-shadow: inset 4px 4px 0 rgba(0, 0, 0, 0.6);
    transform: translateY(4px);
}

.action-btn.warning {
    background-color: var(--warning);
    box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.3), inset -4px -4px 0 rgba(0, 0, 0, 0.3);
}

.action-btn.warning:hover:not(:disabled) {
    background-color: var(--warning-hover);
}

.action-btn.warning:active:not(:disabled) {
    box-shadow: inset 4px 4px 0 rgba(0, 0, 0, 0.4);
    transform: translateY(4px);
}

.action-btn.secondary {
    background-color: var(--bg-panel);
    border: 4px solid var(--border-color);
    color: var(--text-main);
    box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.1), inset -4px -4px 0 rgba(0, 0, 0, 0.3);
}

.action-btn.secondary:hover:not(:disabled) {
    background-color: var(--border-color);
}

.action-btn.secondary:active:not(:disabled) {
    box-shadow: inset 4px 4px 0 rgba(0, 0, 0, 0.4);
    transform: translateY(4px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 14px 24px;
    font-size: 15px;
    flex: 1;
}

.btn-block {
    width: 100%;
    font-size: 16px;
    padding: 14px;
    margin-top: 16px;
}

/* Tablolar */
.table-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin: 20px 0;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.modern-table th,
.modern-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.modern-table th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--warning);
    font-size: 13px;
    text-transform: uppercase;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.go-hand-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 400px;
}

/* =============================================
   LOBI AYARLARI (Custom Radio)
============================================= */
.settings-box {
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border: 4px solid #0f172a;
    border-radius: 0;
    /* Blocky */
    padding: clamp(15px, 4vw, 24px);
    box-shadow: inset 4px 4px 0 rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.setting-group {
    margin-bottom: clamp(15px, 4vw, 20px);
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group h4 {
    color: #cbd5e1;
    font-size: clamp(12px, 3vw, 14px);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
    font-weight: 800;
    text-shadow: 1px 1px 0 #000;
}

/* Modern Yan Yana SeÃƒÂ§im KutularÃ„Â± (Toggle Box) - Papazkimde 3D Blocky Style */
.toggle-group {
    display: flex;
    gap: clamp(6px, 2vw, 10px);
    margin-top: 5px;
    flex-wrap: wrap;
}

.toggle-box {
    flex: 1;
    cursor: pointer;
    min-width: clamp(70px, 20vw, 100px);
}

.toggle-box input[type="radio"] {
    display: none;
}

.toggle-box span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 3vw, 14px) clamp(6px, 2vw, 10px);
    background-color: #1e293b;
    /* Dark bg */
    border: 4px solid #0f172a;
    /* Heavy border */
    border-radius: 0;
    /* Blocky */
    color: #94a3b8;
    text-align: center;
    font-size: clamp(12px, 3vw, 15px);
    font-weight: 800;
    user-select: none;
    transition: all 0.1s ease;
    height: 100%;
    box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.3);
}

.toggle-box:hover span {
    background-color: #334155;
    color: #f8fafc;
}

.toggle-box input[type="radio"]:checked+span {
    border-color: #451a03;
    color: #fff;
    background-color: #d97706;
    /* Okey Gold */
    box-shadow: inset 4px 4px 0 rgba(0, 0, 0, 0.4);
    text-shadow: 1px 1px 0 #000;
}

/* =============================================
   HUD (ÃƒÅ“st Ã…Âerit)
============================================= */
#hud {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hud-left,
.hud-center,
.hud-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.hud-item {
    font-size: 13px;
    color: var(--text-muted);
}

.hud-item strong {
    color: var(--text-main);
    font-weight: 700;
    margin-left: 4px;
}

.hud-item.highlight strong {
    color: var(--warning);
}

.hud-item.limit-seri strong {
    color: var(--success);
}

.hud-item.limit-cift strong {
    color: var(--primary);
}

.mode-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
}

/* =============================================
   ANA OYUN GRID LAYOUT
============================================= */
#screen-lobby,
#screen-ready-check {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#game-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-rows: 1fr auto;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 53px);
    max-width: 1600px;
    margin: 0 auto;
}

#panel-main {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    position: relative;
}

#panel-log {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

#panel-bottom {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =============================================
   OKEY MASASI (Center)
============================================= */
.okey-table {
    background: linear-gradient(to bottom right, var(--wood-light), var(--wood-dark));
    border-radius: 40px;
    padding: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.8);
    height: 100%;
    min-height: 450px;
}

.table-felt {
    background: radial-gradient(circle, var(--felt-green-light) 0%, var(--felt-green) 100%);
    border-radius: 28px;
    height: 100%;
    position: relative;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}


/* Masa Ã„Â°ÃƒÂ§i Bilgiler */
.pos-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}

.player-badge {
    background: var(--bg-dark);
    color: var(--text-main);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.player-badge.highlight {
    border-color: var(--warning);
    color: var(--warning);
}

#table-center-board {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    padding: 20px 30px;
    display: flex;
    gap: 30px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.center-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.center-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.deck-button {
    width: 60px;
    height: 80px;
    background: var(--tile-bg);
    border: 2px solid var(--tile-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    color: var(--bg-dark);
    box-shadow: 0 4px 0 var(--tile-shadow), 0 8px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.1s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.deck-button span {
    font-size: 10px;
    font-weight: 800;
    margin-top: 4px;
}

.deck-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--tile-shadow), 0 12px 20px rgba(0, 0, 0, 0.5);
}

.deck-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--tile-shadow), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.tile-display {
    width: 60px;
    height: 80px;
    background: var(--tile-bg);
    border: 2px solid var(--tile-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--bg-dark);
    box-shadow: 0 4px 0 var(--tile-shadow), 0 8px 15px rgba(0, 0, 0, 0.3);
}

.take-left-btn {
    width: 100%;
    margin-top: 4px;
}

/* =============================================
   TAÃ…Â (TILE) TASARIMI
============================================= */
.tile {
    width: 48px;
    height: 68px;
    background: var(--tile-bg);
    border: 1px solid var(--tile-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--tile-shadow), 0 6px 10px rgba(0, 0, 0, 0.3);
    user-select: none;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.tile:hover {
    transform: translateY(-6px);
    z-index: 10;
}

.tile.selected {
    border: 2px solid var(--warning);
    transform: translateY(-12px);
    box-shadow: 0 6px 0 var(--wood-dark), 0 15px 25px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.tile-value {
    line-height: 1;
    margin-bottom: 2px;
}

.tile-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* TaÃ…Å¸ Renkleri */
.tile.kirmizi .tile-value {
    color: var(--danger);
}

.tile.mavi .tile-value {
    color: var(--primary);
}

.tile.sari .tile-value {
    color: #eab308;
}

/* Koyu sarÃ„Â± daha okunaklÃ„Â± */
.tile.siyah .tile-value {
    color: #1e293b;
}

.tile.sahte .tile-value {
    color: #9333ea;
    font-size: 16px;
}

.kirmizi .tile-color-dot::after {
    background-color: #dc2626;
}

.mavi .tile-color-dot::after {
    background-color: #1d4ed8;
}

.sari .tile-color-dot::after {
    background-color: #eab308;
}

.siyah .tile-color-dot::after {
    background-color: #0f172a;
}

.sahte .tile-color-dot::after {
    background-color: #7e22ce;
}

/* Okey taÃ…Å¸Ã„Â± zemin rengi diÃ„Å¸er tÃƒÂ¼m taÃ…Å¸lar gibi fildiÃ…Å¸i kalsÃ„Â±n */
.tile.okey-tile {
    background: linear-gradient(185deg, #ffffff 0%, #faf7f0 35%, #eee7d8 80%, #ded6c2 100%);
    border-color: #d4cbb8;
}

/* Masa ÃƒÅ“zerindeki KÃƒÂ¼ÃƒÂ§ÃƒÂ¼k TaÃ…Å¸lar (AtÃ„Â±k Havuzu & Seriler) */
.tile-sm {
    width: 34px;
    height: 48px;
    background: var(--tile-bg);
    border: 1px solid var(--tile-border);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 2px 0 var(--tile-shadow);
}

.tile-sm.kirmizi {
    color: var(--danger);
}

.tile-sm.mavi {
    color: var(--primary);
}

.tile-sm.sari {
    color: #d97706;
}

.tile-sm.siyah {
    color: #1e293b;
}

.tile-sm.sahte {
    color: #9333ea;
}

/* Benim Ãƒâ€¡ekebileceÃ„Å¸im Havuz Vurgusu */
.discard-pile-wrap.my-draw-pile .discard-pile-top {
    border: 2px solid var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5), 0 2px 0 var(--success);
}

.meld-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    /* ÃƒÅ“stten ve alttan taÃ…Å¸larÃ„Â±n kutuya yapÃ„Â±Ã…Å¸masÃ„Â±nÃ„Â± engeller */
    flex: 1;
    /* Esnemesini saÃ„Å¸lar */
    min-height: 0;
    /* Flex container iÃƒÂ§inde taÃ…Å¸masÃ„Â±nÃ„Â± engeller */
}

.meld-list::-webkit-scrollbar {
    display: none;
    /* Scrollbar'Ã„Â± gizle (Chrome/Safari) */
}

.meld-group {
    display: flex;
    gap: 2px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 6px;
}

/* =============================================
   ALT PANEL: ISTAKA VE KONTROLLER
============================================= */
.rack-and-actions {
    display: flex;
    gap: 20px;
    height: 100%;
}

/* Istaka (Rack) */
.okey-rack {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.rack-wood-bg {
    background: linear-gradient(to bottom, var(--wood-light), var(--wood-dark));
    border-radius: 12px;
    padding: 12px;
    border: 4px solid var(--wood-border);
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.5);
}

.rack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #fde047;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.sort-buttons {
    display: flex;
    gap: 8px;
}

.rack-slots {
    display: grid;
    grid-template-columns: repeat(15, 48px);
    grid-template-rows: repeat(2, 68px);
    gap: 8px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
}

.rack-slot {
    width: 48px;
    height: 68px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
}

/* Aksiyon Paneli */
.controls-container {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.status-header strong {
    color: var(--text-main);
    font-size: 16px;
}

.mini-tile-row {
    display: flex;
    gap: 4px;
    min-height: 48px;
    margin-bottom: 12px;
}

.action-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

#meld-result {
    font-size: 12px;
    font-weight: 600;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    display: none;
}

#meld-result.valid {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    display: block;
}

#meld-result.invalid {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    display: block;
}

/* =============================================
   LOG PANELÃ„Â°
============================================= */
#panel-log {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    font-size: 14px;
    color: var(--warning);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#log-list {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.log-entry {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--border-color);
    color: var(--text-muted);
    line-height: 1.4;
}

.log-entry.info {
    border-left-color: var(--primary);
}

.log-entry.success {
    border-left-color: var(--success);
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.05);
}

.log-entry.warn {
    border-left-color: var(--warning);
    color: #fde68a;
    background: rgba(245, 158, 11, 0.05);
}

.log-entry.error {
    border-left-color: var(--danger);
    color: #fecaca;
    background: rgba(239, 68, 68, 0.05);
}

/* =============================================
   EFEKTLER & MODALLAR
============================================= */
.playable-glow {
    border-color: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6), 0 4px 0 var(--success);
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.4), 0 4px 0 var(--success);
    }

    100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8), 0 4px 0 var(--success);
    }
}

.alert-banner {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    background: linear-gradient(145deg, rgba(20, 25, 35, 0.95), rgba(10, 15, 20, 0.98));
    backdrop-filter: blur(16px);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-top: 2px solid rgba(212, 175, 55, 0.6);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 700px;
    text-align: center;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.9), inset 0 2px 10px rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-box h2 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(to bottom, #ffe066, #f59e0b, #b45309);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    text-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
    letter-spacing: 1px;
}

.scenario-badge {
    display: inline-block;
    background: var(--danger);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.mt-4 {
    margin-top: 24px;
}

/* Responsive adjustments for smaller desktop screens */
@media (max-width: 1400px) {
    /* Full-width rack keeps proportional grid */
}

/* =============================================
   LOBÃ„Â° OTURMA DÃƒÅ“ZENÃ„Â° VE MASA GÃƒâ€“RSELÃ„Â°
============================================= */
.lobby-seat-map {
    width: 100%;
    aspect-ratio: 1;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 24px;
    padding: 20px;
    background: linear-gradient(145deg, #653010, #2c1200);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 5px 15px rgba(255, 255, 255, 0.1), inset 0 -5px 20px rgba(0, 0, 0, 0.9);
    border: 1px solid #1a0a00;
}

.lobby-felt-board {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #0f5132 0%, #062f1a 100%);
    border-radius: 20px;
    position: relative;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.5);
    border: 3px solid #8b5a2b;
    /* wood-like border */
    overflow: hidden;
}

.lobby-seat-pos {
    position: absolute;
    width: 120px;
    height: 70px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #b8860b;
    /* dark goldenrod */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Koltuk KonumlarÃ„Â± */
.seat-top {
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-bottom {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-left {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.seat-right {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* KatÃ„Â±l ButonlarÃ„Â± */
.seat-join-btn {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(218, 165, 32, 0.6);
    border-radius: 8px;
    color: #ffd700;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.seat-join-btn:hover {
    background: linear-gradient(180deg, rgba(218, 165, 32, 0.3) 0%, rgba(218, 165, 32, 0.1) 100%);
    border-color: #ffd700;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.5);
}

/* Oturan Oyuncu KartÃ„Â± & Kalk Butonu */
.seat-occupied {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    justify-content: space-around;
    position: relative;
}

.seat-player-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
}

.seat-player-status {
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 12px;
}

.seat-player-status.ready {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.seat-player-status.not-ready {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Koltuktan Kalk Butonu & Hover MantÃ„Â±Ã„Å¸Ã„Â± */
.seat-leave-btn {
    display: none;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e05b5b 0%, #c0392b 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.seat-leave-btn:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #d63031 100%);
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.1), 0 0 12px rgba(230, 91, 91, 0.5);
}

.seat-occupied.is-me:hover .seat-player-name,
.seat-occupied.is-me:hover .seat-player-status {
    display: none !important;
}

.seat-occupied.is-me:hover .seat-leave-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Masa OrtasÃ„Â±ndaki Panel */
.lobby-felt-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

#seat-mode-info {
    font-weight: 800;
    font-size: 14px;
    color: var(--warning);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =============================================
   YARDIMLI MOD VE PUAN TABLOSU STÃ„Â°LLERÃ„Â°
============================================= */
.tile.playable-glow {
    position: relative;
    animation: tileGlowPulse 1.5s infinite alternate;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.8), 0 4px 0 var(--tile-shadow);
    border-color: #60a5fa;
}

@keyframes tileGlowPulse {
    0% {
        box-shadow: 0 0 6px rgba(59, 130, 246, 0.4), 0 4px 0 var(--tile-shadow);
    }

    100% {
        box-shadow: 0 0 16px rgba(59, 130, 246, 0.9), 0 4px 0 var(--tile-shadow);
    }
}

.player-score-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-top: 4px;
    text-align: center;
}

/* =============================================
   ZYNGA OKEY 101 TARZI YENÃ„Â° UI TASARIMI
============================================= */

/* Genel Oyun EkranÃ„Â± - Sadece oyun ekranÃ„Â± %50 kÃƒÂ¼ÃƒÂ§ÃƒÂ¼ltÃƒÂ¼lÃƒÂ¼r */
.zynga-layout {
    display: flex;
    flex-direction: column;
    background: transparent;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
    /* Oyun ekranÃ„Â±nÃ„Â± %50 kÃƒÂ¼ÃƒÂ§ÃƒÂ¼lt */
    transform: scale(0.5);
    transform-origin: top left;
    width: 200vw;
    height: 200vh;
    position: absolute;
    top: 0;
    left: 0;
}

#game-board {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 8px;
    min-height: 0;
}

/* Orta Alan (YeÃ…Å¸il Masa) */
.center-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 60px;
    /* Increased to shrink the blue area as requested */
    position: relative;
    min-height: 0;
}

.top-opponent {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

/* Sol ve SaÃ„Å¸ paneller iÃƒÂ§in merkezi hizalama saÃ„Å¸la */
#game-board .player-panel {
    width: 160px;
    flex-shrink: 0;
}

.green-felt-grid {
    flex: 1;
    min-height: 0;
    margin: 30px 60px;
    /* added margin to shrink the area */
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    padding: 8px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* AtÃ„Â±k Havuzu KÃƒÂ¶Ã…Å¸eleri (Discard Pile Corners) */
#corner-dpile-top-left {
    position: absolute;
    top: 20vh;
    left: 22vw;
    z-index: 20;
    transform: scale(1.4);
}

#corner-dpile-top-right {
    position: absolute;
    top: 20vh;
    right: 22vw;
    z-index: 20;
    transform: scale(1.4);
}

#corner-dpile-bottom-left {
    position: absolute;
    bottom: clamp(10px, 4vh, 40px);
    left: 22vw;
    z-index: 20;
    transform: scale(1.4);
}

#corner-dpile-bottom-right {
    position: absolute;
    bottom: clamp(10px, 4vh, 40px);
    right: 22vw;
    z-index: 20;
    transform: scale(1.4);
}

.green-felt-grid::after {
    content: none;
}





.meld-owner-title {
    font-size: clamp(10px, 0.85vw, 13px);
    font-weight: 900;
    color: #fcd87a;
    background: rgba(0, 0, 0, 0.65);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(212, 160, 23, 0.4);
    text-shadow: 0 1px 2px black;
    width: 100%;
    text-align: center;
}

.opened-meld {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 10, 5, 0.75);
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(212, 160, 23, 0.5);
    border-radius: clamp(6px, 0.6vw, 10px);
    padding: 4px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.meld-tiles-wrap {
    display: flex;
    gap: 2px;
    align-items: center;
}

.meld-add-btn {
    margin-left: 4px !important;
    background: linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    color: white !important;
    font-weight: 900 !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

.center-board-deck-container {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 25;
    border-radius: 12px;
    border: 2px solid rgba(212, 160, 23, 0.6);
    z-index: 50;
    display: flex;
    pointer-events: auto;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.board-indicators {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.2vw, 22px);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(212, 160, 23, 0.4);
    border-radius: clamp(10px, 1vw, 18px);
    padding: clamp(8px, 0.9vw, 16px) clamp(12px, 1.4vw, 24px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    overflow: visible;
}

/* ===== DESTE TAÃ…Â Ãƒâ€¡EK KUTUSU Ã¢â‚¬â€ PRO TASARIM ===== */

/* Ana deste kutusu: box-shadow ile istiflenmiÃ…Å¸ kart derinliÃ„Å¸i (overflow-safe) */
.deck-box {
    position: relative;
    width: clamp(72px, 6.8vw, 115px);
    height: clamp(98px, 9vw, 152px);
    background: linear-gradient(160deg, #7c4a1e 0%, #4a2510 40%, #2e1208 100%);
    border: clamp(2px, 0.18vw, 3px) solid #d4a017;
    border-radius: clamp(8px, 0.8vw, 14px);
    padding: clamp(4px, 0.5vw, 8px);
    color: white;
    cursor: pointer;
    /* Ã„Â°stiflenmiÃ…Å¸ kart derinliÃ„Å¸i: box-shadow katmanlarÃ„Â± (overflow-safe yÃƒÂ¶ntem) */
    box-shadow:
        /* 1. kart katmanÃ„Â± (hafif saÃ„Å¸a-alta) */
        clamp(3px, 0.3vw, 5px) clamp(4px, 0.4vw, 7px) 0 0 #5c3010,
        clamp(3px, 0.3vw, 5px) clamp(4px, 0.4vw, 7px) 0 1px #a07020,
        /* 2. kart katmanÃ„Â± (daha fazla) */
        clamp(6px, 0.55vw, 9px) clamp(7px, 0.7vw, 12px) 0 0 #3d1e08,
        clamp(6px, 0.55vw, 9px) clamp(7px, 0.7vw, 12px) 0 1px #7a5515,
        /* Alt gÃƒÂ¶lge derinliÃ„Å¸i */
        0 clamp(12px, 1.2vw, 20px) clamp(8px, 0.8vw, 14px) rgba(0, 0, 0, 0.65),
        /* AltÃ„Â±n dÃ„Â±Ã…Å¸ ÃƒÂ§izgi glow */
        0 0 0 1px rgba(212, 160, 23, 0.25),
        /* ÃƒÅ“st iÃƒÂ§ parlama */
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.deck-box-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(3px, 0.35vw, 7px);
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* DESTE etiketi Ã¢â‚¬â€ oyma altÃ„Â±n yazÃ„Â± */
.deck-title {
    font-size: clamp(10px, 0.85vw, 15px);
    font-weight: 900;
    color: #fcd87a;
    letter-spacing: clamp(1.5px, 0.15vw, 3px);
    text-transform: uppercase;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 -1px 0 rgba(255, 220, 100, 0.3);
    border-bottom: 1px solid rgba(212, 160, 23, 0.35);
    padding-bottom: clamp(2px, 0.2vw, 4px);
    width: 100%;
    text-align: center;
}

/* TaÃ…Å¸ sayÃ„Â±sÃ„Â± Ã¢â‚¬â€ fildiÃ…Å¸i baskÃ„Â± kutusu */
.deck-count {
    font-size: clamp(22px, 2.2vw, 40px);
    font-weight: 900;
    background: linear-gradient(180deg, #ffffff 0%, #f5f0e8 50%, #e8e0ce 100%);
    color: #1a0e04;
    padding: clamp(2px, 0.25vw, 5px) clamp(10px, 0.9vw, 18px);
    border-radius: clamp(5px, 0.45vw, 9px);
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.25),
        inset 0 -1px 2px rgba(255, 255, 255, 0.8),
        0 2px 5px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(180, 140, 60, 0.4);
    line-height: 1;
    min-width: clamp(36px, 3.5vw, 60px);
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

/* TAÃ…Â Ãƒâ€¡EK yazÃ„Â±sÃ„Â± Ã¢â‚¬â€ aktif / pasif */
.draw-text {
    font-size: clamp(8px, 0.72vw, 12px);
    font-weight: 900;
    color: rgba(255, 215, 80, 0.5);
    text-transform: uppercase;
    letter-spacing: clamp(0.5px, 0.08vw, 1.5px);
    text-align: center;
    width: 100%;
    margin-top: clamp(1px, 0.1vw, 2px);
}

button.deck-box:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    filter: grayscale(35%) brightness(0.85);
    border-color: #d4a017 !important;
    box-shadow:
        clamp(3px, 0.3vw, 5px) clamp(4px, 0.4vw, 7px) 0 0 #5c3010,
        clamp(3px, 0.3vw, 5px) clamp(4px, 0.4vw, 7px) 0 1px #a07020,
        clamp(6px, 0.55vw, 9px) clamp(7px, 0.7vw, 12px) 0 0 #3d1e08,
        clamp(6px, 0.55vw, 9px) clamp(7px, 0.7vw, 12px) 0 1px #7a5515,
        0 clamp(12px, 1.2vw, 20px) clamp(8px, 0.8vw, 14px) rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(212, 160, 23, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35) !important;
    animation: none !important;
}

button.deck-box:disabled .draw-text {
    color: rgba(245, 216, 154, 0.4) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    animation: none !important;
}

button.deck-box:disabled .deck-count {
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.25),
        inset 0 -1px 2px rgba(255, 255, 255, 0.8),
        0 2px 5px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(180, 140, 60, 0.4) !important;
}

/* YALNIZCA SIRA BENDE VE TAÃ…Â Ãƒâ€¡EKEBÃ„Â°LÃ„Â°RÃ„Â°M (.active-draw-glow) -> CANLI MAVÃ„Â° NEON ISIK & ANIMASYON */
button.deck-box.active-draw-glow {
    border-color: #60a5fa !important;
    box-shadow:
        0 0 clamp(16px, 1.8vw, 32px) rgba(59, 130, 246, 1),
        0 0 clamp(8px, 0.9vw, 16px) rgba(59, 130, 246, 0.6),
        0 clamp(5px, 0.55vw, 9px) 0 #1d4ed8,
        inset 0 0 clamp(10px, 1.1vw, 20px) rgba(59, 130, 246, 0.45) !important;
    animation: deck-pulse 1.5s infinite ease-in-out !important;
    cursor: pointer !important;
}

button.deck-box.active-draw-glow .draw-text {
    color: #60a5fa !important;
    text-shadow: 0 0 clamp(8px, 0.8vw, 14px) rgba(96, 165, 250, 1) !important;
    animation: draw-text-glow 1.5s infinite ease-in-out !important;
}

button.deck-box.active-draw-glow .deck-count {
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.25),
        inset 0 -1px 2px rgba(255, 255, 255, 0.8),
        0 0 10px rgba(59, 130, 246, 0.5),
        0 0 0 1.5px rgba(96, 165, 250, 0.6) !important;
}

button.deck-box.active-draw-glow:hover {
    transform: translateY(clamp(-4px, -0.4vw, -7px)) scale(1.06) !important;
    box-shadow:
        0 0 clamp(24px, 2.4vw, 42px) rgba(59, 130, 246, 1),
        0 0 clamp(12px, 1.2vw, 22px) rgba(59, 130, 246, 0.8),
        0 clamp(6px, 0.65vw, 11px) 0 #1d4ed8,
        inset 0 0 clamp(12px, 1.2vw, 22px) rgba(59, 130, 246, 0.55) !important;
}

button.deck-box.active-draw-glow:active {
    transform: translateY(clamp(2px, 0.2vw, 4px)) scale(0.97) !important;
    box-shadow:
        0 0 clamp(10px, 1vw, 18px) rgba(59, 130, 246, 0.7),
        0 clamp(2px, 0.2vw, 4px) 0 #1d4ed8,
        inset 0 0 clamp(6px, 0.7vw, 12px) rgba(59, 130, 246, 0.4) !important;
}

@keyframes deck-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.045);
    }
}

@keyframes draw-text-glow {

    0%,
    100% {
        opacity: 0.85;
        text-shadow: 0 0 6px rgba(96, 165, 250, 0.7);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 12px rgba(96, 165, 250, 1), 0 0 20px rgba(96, 165, 250, 0.5);
    }
}

/* ===== GÃƒâ€“STERGE KUTUSU Ã¢â‚¬â€ PRO TASARIM ===== */
.indicator-box {
    width: clamp(72px, 6.8vw, 115px);
    height: clamp(98px, 9vw, 152px);
    background: linear-gradient(160deg, #2e1a06 0%, #1c0d03 60%, #120902 100%);
    border: clamp(2px, 0.18vw, 3px) solid #c8882e;
    border-radius: clamp(8px, 0.8vw, 14px);
    padding: clamp(4px, 0.5vw, 8px);
    color: white;
    box-shadow:
        0 clamp(4px, 0.5vw, 8px) 0 #0c0602,
        0 clamp(6px, 0.8vw, 14px) clamp(3px, 0.35vw, 6px) rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(200, 136, 46, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 0.4vw, 8px);
}

.indicator-title {
    font-size: clamp(10px, 0.85vw, 15px);
    font-weight: 900;
    color: #fcd87a;
    letter-spacing: clamp(1px, 0.12vw, 2px);
    text-transform: uppercase;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 -1px 0 rgba(255, 220, 100, 0.25);
    border-bottom: 1px solid rgba(200, 136, 46, 0.3);
    padding-bottom: clamp(2px, 0.2vw, 4px);
    width: 100%;
    text-align: center;
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 15px 5px rgba(0, 150, 255, 0.4), inset 0 0 10px rgba(0, 150, 255, 0.2), 0 6px 10px rgba(0, 0, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 20px 8px rgba(0, 150, 255, 0.8), inset 0 0 15px rgba(0, 150, 255, 0.5), 0 6px 10px rgba(0, 0, 0, 0.5);
    }

    100% {
        box-shadow: 0 0 15px 5px rgba(0, 150, 255, 0.4), inset 0 0 10px rgba(0, 150, 255, 0.2), 0 6px 10px rgba(0, 0, 0, 0.5);
    }
}

.board-limits {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    background: #6f4214;
    border: 3px solid #b87c2b;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.limit-badge {
    background: rgba(20, 10, 0, 0.5);
    border: 2px solid #e39659;
    border-radius: 6px;
    padding: 6px 14px;
    color: #ffd700;
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 1px;
    box-sizing: border-box;
}

/* Oyuncu Panelleri (Sol / SaÃ„Å¸ / ÃƒÅ“st) */
.player-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    gap: 6px;
    z-index: 30;
}

.player-panel.pos-left {
    transform: translate(12vw, 16vh);
}

.player-panel.pos-right {
    transform: translate(-12vw, 16vh);
}

/* Referans Zynga stiline uygun kompakt oyuncu kartÃ„Â± */
.player-info-card {
    background: linear-gradient(to bottom, #2a1a08, #1a0d04);
    border: 3px solid #c8882e;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    color: white;
    width: 160px;
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.player-info-card .avatar-img {
    font-size: 44px;
    background: linear-gradient(to bottom, #3a2010, #1e0e04);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    line-height: 70px;
    margin: 0 auto 6px;
    border: 3px solid #c8882e;
    display: block;
}

.player-info-card .p-name {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
    color: #f5d89a;
}

.player-info-card .p-score {
    font-size: 32px;
    color: #ffd700;
    font-weight: 900;
    line-height: 1;
    display: block;
}

.discard-pile-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 0.6vw, 10px);
}

/* Soldan AlÃ„Â±nan TaÃ…Å¸Ã„Â± Geri BÃ„Â±rak Butonu Ã¢â‚¬â€ Profesyonel 3D TasarÃ„Â±m */
.btn-return-discard {
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%) !important;
    border: 1.5px solid #fca5a5 !important;
    border-radius: clamp(6px, 0.6vw, 12px) !important;
    padding: clamp(5px, 0.5vw, 9px) clamp(10px, 1vw, 18px) !important;
    font-size: clamp(11px, 1vw, 15px) !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    letter-spacing: 0.5px !important;
    box-shadow:
        0 clamp(4px, 0.45vw, 7px) 0 #7f1d1d,
        0 clamp(6px, 0.7vw, 12px) rgba(0, 0, 0, 0.5),
        inset 0 1.25px 0 rgba(255, 255, 255, 0.35) !important;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 2px 4px rgba(0, 0, 0, 0.8) !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    margin-top: 2px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 40;
}

.btn-return-discard:hover {
    transform: translateY(-2px) !important;
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow:
        0 clamp(6px, 0.6vw, 9px) 0 #7f1d1d,
        0 0 16px rgba(239, 68, 68, 0.8) !important;
}

.btn-return-discard:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #7f1d1d !important;
}

/* AtÃ„Â±k taÃ…Å¸ atma yerleri (Masa ile birebir aynÃ„Â± koyu yeÃ…Å¸il ÃƒÂ§uha zeminli Ã¢â‚¬â€ %25 OranÃ„Â±nda KÃƒÂ¼ÃƒÂ§ÃƒÂ¼ltÃƒÂ¼ldÃƒÂ¼ ve Dengelendi) */
.discard-pile-wrap {
    background: radial-gradient(circle at 35% 35%, #064e3b 0%, #032b17 75%, #021a0e 100%) !important;
    border-radius: clamp(8px, 0.6vw, 12px) !important;
    padding: clamp(4px, 0.4vw, 9px) !important;
    min-height: clamp(86px, 6.8vw, 120px) !important;
    min-width: clamp(60px, 4.6vw, 86px) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.8), 0 5px 10px rgba(0, 0, 0, 0.6);
    border: 2px solid #0f766e !important;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* AtÃ„Â±lan TaÃ…Å¸ GÃƒÂ¶rseli (%25 KÃƒÂ¼ÃƒÂ§ÃƒÂ¼ltÃƒÂ¼lmÃƒÂ¼Ã…Å¸ ve DengelenmiÃ…Å¸ 3D Okey TaÃ…Å¸Ã„Â±) */
.discard-pile-wrap .tile-sm,
.tile-sm {
    width: clamp(48px, 3.8vw, 69px) !important;
    height: clamp(71px, 5.6vw, 102px) !important;
    min-height: clamp(71px, 5.6vw, 102px) !important;
    aspect-ratio: 27 / 40 !important;
    border-radius: clamp(5px, 0.4vw, 8px) !important;
    padding: clamp(2px, 0.2vw, 4px) !important;
    font-size: clamp(27px, 2.2vw, 42px) !important;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

.tile-sm .tile-value {
    font-size: clamp(27px, 2.2vw, 42px) !important;
    margin-top: clamp(1px, 0.15vw, 2px) !important;
}

.tile-sm .tile-color-dot {
    width: clamp(14px, 1vw, 20px) !important;
    height: clamp(14px, 1vw, 20px) !important;
    margin-bottom: clamp(2px, 0.15vw, 4px) !important;
    box-shadow: inset 1px 1.5px 3px rgba(0, 0, 0, 0.4) !important;
}

.tile-sm .tile-color-dot::after {
    width: clamp(6px, 0.4vw, 9px) !important;
    height: clamp(6px, 0.4vw, 9px) !important;
}

.empty-dpile-placeholder {
    color: #047857;
    font-size: clamp(27px, 2.1vw, 39px);
    font-weight: bold;
}

.my-draw-pile {
    border-color: #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7), inset 0 3px 8px rgba(0, 0, 0, 0.7) !important;
}

/* Alt Aksiyon Ãƒâ€¡ubuÃ„Å¸u */
#bottom-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
}

.action-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: clamp(6px, 0.8vw, 14px);
    z-index: 30;
}

.action-control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(5px, 0.625vw, 10px);
}

.action-center {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.25vw, 22.5px);
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(10px);
    border: 2.5px solid rgba(212, 160, 23, 0.4);
    border-radius: clamp(15px, 1.5vw, 25px);
    padding: clamp(7.5px, 0.75vw, 12.5px) clamp(15px, 1.5vw, 30px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1.25px 0 rgba(255, 255, 255, 0.2);
}

/* 3D Profesyonel Seri AÃƒÂ§ ve Ãƒâ€¡ift AÃƒÂ§ ButonlarÃ„Â± */
.action-btn {
    border: none;
    border-radius: clamp(10px, 1vw, 17.5px);
    padding: clamp(12.5px, 1.25vw, 20px) clamp(22.5px, 2vw, 40px);
    font-weight: 900;
    font-size: clamp(17.5px, 1.625vw, 27.5px);
    color: white;
    cursor: pointer;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    letter-spacing: 0.625px;
}

/* SERÃ„Â° AÃƒâ€¡ (Lacivert 3D Buton) */
.btn-open-seri {
    background: linear-gradient(180deg, #2563eb 0%, #0f172a 100%) !important;
    box-shadow:
        0 clamp(5px, 0.56vw, 8.75px) 0 #090d16,
        0 clamp(7.5px, 0.875vw, 15px) rgba(0, 0, 0, 0.4),
        inset 0 1.25px 0 rgba(255, 255, 255, 0.4) !important;
    border: 1.25px solid #60a5fa !important;
    margin-top: -10px;
    -webkit-text-stroke: 1px #000000;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.btn-open-seri:not(:disabled):hover {
    transform: translateY(-2.5px);
    background: linear-gradient(180deg, #3b82f6 0%, #1e3a8a 100%) !important;
    box-shadow:
        0 clamp(7.5px, 0.75vw, 11.25px) 0 #090d16,
        0 0 18.75px rgba(59, 130, 246, 0.7) !important;
}

/* Ãƒâ€¡Ã„Â°FT AÃƒâ€¡ (SarÃ„Â± 3D Buton) */
.btn-open-cift {
    background: linear-gradient(180deg, #facc15 0%, #ca8a04 100%) !important;
    box-shadow:
        0 clamp(5px, 0.56vw, 8.75px) 0 #854d0e,
        0 clamp(7.5px, 0.875vw, 15px) rgba(0, 0, 0, 0.4),
        inset 0 1.25px 0 rgba(255, 255, 255, 0.5) !important;
    border: 1.25px solid #fef08a !important;
    margin-top: -10px;
    -webkit-text-stroke: 1px #000000;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.btn-open-cift:not(:disabled):hover {
    transform: translateY(-2.5px);
    background: linear-gradient(180deg, #fef08a 0%, #eab308 100%) !important;
    box-shadow:
        0 clamp(7.5px, 0.75vw, 11.25px) 0 #854d0e,
        0 0 18.75px rgba(250, 204, 21, 0.7) !important;
}

.action-btn:active:not(:disabled) {
    transform: translateY(3.75px) !important;
    box-shadow: 0 1.25px 0 rgba(0, 0, 0, 0.5) !important;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(80%);
    box-shadow: none !important;
}

/* SERÃ„Â°: 0 ve Ãƒâ€¡Ã„Â°FT: 0 Limit Paneli (Ortadaki Rozet Grubu) */
.board-limits {
    display: flex;
    flex-direction: row;
    gap: clamp(7.5px, 0.75vw, 15px);
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #3d1e08 0%, #241104 100%);
    border: 2.5px solid #b87c2b;
    border-radius: clamp(10px, 1vw, 15px);
    padding: clamp(5px, 0.5vw, 10px) clamp(10px, 1vw, 17.5px);
    box-shadow: inset 0 2.5px 5px rgba(0, 0, 0, 0.5), 0 5px 12.5px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.limit-badge {
    background: rgba(15, 7, 1, 0.7);
    border: 1.875px solid #e39659;
    border-radius: clamp(5px, 0.5vw, 10px);
    padding: clamp(3.75px, 0.375vw, 7.5px) clamp(10px, 1vw, 17.5px);
    color: #f5d89a;
    font-weight: 900;
    font-size: clamp(15px, 1.375vw, 22.5px);
    line-height: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.625px;
}

.limit-badge span {
    color: #ffd700;
    font-size: clamp(17.5px, 1.5vw, 25px);
    margin-left: 2.5px;
    transition: all 0.3s ease;
}

/* Limit GeÃƒÂ§ilemediÃ„Å¸inde (SÃ„Â±nÃ„Â±rÃ„Â±n AltÃ„Â±nda) - KÃ„Â±rmÃ„Â±zÃ„Â± UyarÃ„Â± Stili */
.limit-badge.limit-failed {
    border-color: #ef4444 !important;
    background: rgba(127, 29, 29, 0.85) !important;
    color: #fca5a5 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.limit-badge.limit-failed span {
    color: #f87171 !important;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.8) !important;
}

/* 101 Puan / Ãƒâ€¡ift Limiti AÃ…Å¸Ã„Â±ldÃ„Â±Ã„Å¸Ã„Â±nda Parlayan YeÃ…Å¸il Ã„Â°ndikatÃƒÂ¶r */
.limit-badge.limit-passed {
    border-color: #34d399 !important;
    background: rgba(6, 95, 70, 0.85) !important;
    color: #a7f3d0 !important;
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    animation: limitGlowPulse 1.8s infinite ease-in-out;
}

.limit-badge.limit-passed span {
    color: #4ade80 !important;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.95) !important;
}

@keyframes limitGlowPulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
    }

    50% {
        box-shadow: 0 0 18px rgba(52, 211, 153, 0.95);
    }
}

/* Oyuncu KartÃ„Â± (ÄŸÅ¸â€˜Â¤ Sen 0) Ã¢â‚¬â€ Butonlar YapÃ„Â±sÃ„Â±nÃ„Â±n Tam ÃƒÅ“stÃƒÂ¼nde ve OrtasÃ„Â±nda */
.my-player-info {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3e1f08 0%, #251204 100%);
    border: 2.5px solid #b87c2b;
    border-radius: clamp(10px, 1vw, 17.5px);
    padding: clamp(3.75px, 0.375vw, 7.5px) clamp(15px, 1.375vw, 25px);
    color: white;
    gap: clamp(7.5px, 0.75vw, 15px);
    box-shadow: inset 0 1.25px 0 rgba(255, 255, 255, 0.15), 0 5px 15px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

.my-player-info .avatar-img {
    font-size: clamp(22.5px, 2vw, 35px);
}

.my-player-info .my-name {
    font-size: clamp(13.75px, 1.25vw, 20px);
    font-weight: bold;
    text-transform: uppercase;
    color: #f5d89a;
}

.my-player-info .my-score {
    color: #ffd700;
    font-weight: 900;
    font-size: clamp(17.5px, 1.625vw, 27.5px);
}

.selection-box {
    background: #6f4214;
    border: 3px solid #b87c2b;
    border-radius: 14px;
    padding: 16px 20px;
    color: white;
    font-size: 22px;
}

/* Istaka (Rack) - Ekran Boyutuna GÃƒÂ¶re %100 OrantÃ„Â±lÃ„Â± Ãƒâ€“lÃƒÂ§eklenen Istaka (350px Kenar BoÃ…Å¸luklu) */
.rack-wrapper {
    display: flex;
    align-items: flex-end;
    width: 100%;
    gap: 8px;
    padding: 0 clamp(20px, 18.2vw, 350px);
    /* 1920px pencerelerde tam 350px (250px + 100px ekleme) */
    margin: 0 auto;
    box-sizing: border-box;
    justify-content: stretch;
}

.rack-left-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    padding-left: 0;
    padding-bottom: 12px;
}

.rack-right-panel {
    display: flex;
    position: absolute;
    left: calc(100% + clamp(10px, 1vw, 20px));
    bottom: calc(clamp(16px, 1.8vw, 32px) + clamp(85px, 11.4vw, 220px) + 80px);
    z-index: 20;
}

/* Okey TaÃ…Å¸Ã„Â± Boyutunda & 3D FildiÃ…Å¸i Melamin TasarÃ„Â±mÃ„Â±nda AkÃ„Â±Ã…Å¸kan Seri/Ãƒâ€¡ift Diz ButonlarÃ„Â± */
.tile-sort-btn {
    width: auto;
    height: clamp(85px, 11.4vw, 220px);
    aspect-ratio: 27 / 40;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(185deg, #ffffff 0%, #faf7f0 35%, #eee7d8 80%, #ded6c2 100%) !important;
    border-radius: clamp(5px, 0.6vw, 10px) !important;
    border: 1.5px solid #d4cbb8 !important;
    box-shadow:
        0 clamp(4px, 0.45vw, 8px) 0 #b3a894,
        0 clamp(6px, 0.6vw, 10px) 3px rgba(0, 0, 0, 0.35),
        0 clamp(10px, 1vw, 18px) 20px rgba(0, 0, 0, 0.3),
        inset 0 2.5px 3px rgba(255, 255, 255, 1),
        inset 0 -3px 5px rgba(0, 0, 0, 0.12) !important;
    cursor: pointer;
    user-select: none;
    transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.12s ease;
    padding: 4px;
    margin: 0;
}

.tile-sort-btn:hover:not(:disabled) {
    transform: translateY(-8px);
    box-shadow:
        0 12px 0 #b3a894,
        0 13px 3px rgba(0, 0, 0, 0.35),
        0 18px 22px rgba(0, 0, 0, 0.35),
        inset 0 2.5px 4px rgba(255, 255, 255, 1) !important;
    z-index: 25;
}

.tile-sort-btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #b3a894,
        0 4px 8px rgba(0, 0, 0, 0.4) !important;
}

/* SERÃ„Â° DÃ„Â°Z Oyma YazÃ„Â± Stili (Lacivert Metin) */
#btn-sort-seri .btn-tile-text {
    color: #1e3a8a;
    font-size: clamp(14px, 1.8vw, 34px);
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    text-shadow:
        0 1.5px 1.5px rgba(0, 30, 80, 0.4),
        0 -1px 0.5px rgba(255, 255, 255, 0.85);
    letter-spacing: -0.5px;
}

/* Okey TaÃ…Å¸Ã„Â± Boyutunda AkÃ„Â±Ã…Å¸kan Ãƒâ€¡ift Diz Butonu (Sol Panel Konumu) */
.rack-left-panel-btn {
    display: flex;
    position: absolute;
    right: calc(100% + clamp(10px, 1vw, 20px));
    bottom: calc(clamp(16px, 1.8vw, 32px) + clamp(85px, 11.4vw, 220px) + 80px);
    z-index: 20;
}

/* Ãƒâ€¡Ã„Â°FT DÃ„Â°Z Oyma YazÃ„Â± Stili (SarÃ„Â± Metin & Siyah Ã„Â°nce Ãƒâ€¡izgi) */
#btn-sort-cift .btn-tile-text {
    color: #facc15;
    font-size: clamp(14px, 1.8vw, 34px);
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    -webkit-text-stroke: 1px #000000;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
}

/* Rack container fills the bottom with fluid side margins */
.rack-wrapper .rack-container {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.rack-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
}

.rack-wood-texture {
    background: url('wood.png') repeat center center;
    background-size: cover;
    border-radius: clamp(10px, 1vw, 20px) clamp(10px, 1vw, 20px) clamp(6px, 0.5vw, 10px) clamp(6px, 0.5vw, 10px);
    display: flex;
    position: relative;
    box-shadow: 0 -15px 45px rgba(0, 0, 0, 0.9), inset 0 4px 10px rgba(255, 255, 255, 0.3), inset 0 -8px 16px rgba(0, 0, 0, 0.6);
    border-bottom: 3px solid #3d1f06;
    border-top: clamp(3px, 0.3vw, 6px) solid #f59e0b;
    width: 100%;
    padding: clamp(24px, 2vw, 42px) clamp(10px, 1vw, 18px);
    box-sizing: border-box;
}

.rack-side {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: clamp(14px, 1.4vw, 24px);
    background: linear-gradient(to right, #1a0a00, #2c1200);
    box-shadow: inset 0 0 14px black, 0 0 10px rgba(0, 0, 0, 0.8);
    z-index: 5;
    pointer-events: none;
}

.rack-side.left {
    left: 0;
    border-radius: clamp(10px, 1vw, 20px) 0 0 clamp(6px, 0.5vw, 10px);
}

.rack-side.right {
    right: 0;
    border-radius: 0 clamp(10px, 1vw, 20px) clamp(6px, 0.5vw, 10px) 0;
    background: linear-gradient(to left, #1a0a00, #2c1200);
}

/* BasamaklÃ„Â± Istaka (17 SÃƒÂ¼tunlu / TÃƒÂ¼m Ekranlarda %100 AkÃ„Â±Ã…Å¸kan HizalÃ„Â± Grid) */
.rack-slots-grid {
    display: grid;
    flex: 1 1 100%;
    width: 100%;
    grid-template-columns: repeat(17, 1fr);
    grid-template-rows: repeat(2, auto);
    row-gap: clamp(14px, 1.8vw, 36px);
    column-gap: 0px;
    padding: clamp(16px, 1.8vw, 32px) clamp(8px, 0.9vw, 18px);
    box-sizing: border-box;
    justify-content: stretch;
    position: relative;
}

/* 1. KatÃ„Â±n (Alt Basamak) AltÃ„Â±ndaki AhÃ…Å¸ap Ãƒâ€¡Ã„Â±ta (Her Ekranda Tam HizalÃ„Â± Ledge Line) */
.rack-wood-texture::before {
    content: '';
    position: absolute;
    bottom: clamp(-4px, -0.3vw, 0px);
    left: clamp(16px, 1.5vw, 28px);
    right: clamp(16px, 1.5vw, 28px);
    height: clamp(10px, 1vw, 14px);
    background: linear-gradient(to bottom, #0f0602 0%, #301705 40%, #542b0c 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.95), inset 0 3px 5px rgba(0, 0, 0, 0.85), inset 0 -1px 2px rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    pointer-events: none;
    z-index: 2;
}

/* 2. Kat (ÃƒÅ“st Basamak) ile Alt Kat ArasÃ„Â±ndaki AhÃ…Å¸ap Ãƒâ€¡Ã„Â±ta (AkÃ„Â±Ã…Å¸kan HizalÃ„Â±) */
.rack-slots-grid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    right: 8px;
    height: clamp(5px, 0.5vw, 10px);
    transform: translateY(calc(-50% + clamp(4px, 0.5vw, 10px)));
    background: linear-gradient(to bottom, #0f0602 0%, #301705 40%, #542b0c 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.95), inset 0 3px 5px rgba(0, 0, 0, 0.85), inset 0 -1px 2px rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}

.rack-slot {
    background: transparent;
    /* HÃƒÂ¼crenin gÃƒÂ¶rsel kutusu kaldÃ„Â±rÃ„Â±ldÃ„Â± (ÃƒÂ§alÃ„Â±Ã…Å¸ma mantÃ„Â±Ã„Å¸Ã„Â± korundu) */
    border: none;
    box-shadow: none;
    position: relative;
    width: 100%;
    /* YÃƒÂ¼kseklik vw ile ÃƒÂ¶lÃƒÂ§eklenir: 1920px = 210px, kÃƒÂ¼ÃƒÂ§ÃƒÂ¼k ekranlarda orantÃ„Â±lÃ„Â± daralÃ„Â±r, taÃ…Å¸maz */
    height: clamp(80px, 10.9vw, 210px);
    margin: 0;
}

/* 2. Kat (ÃƒÅ“st / Arka Basamak - Ã„Â°lk 17 Slot) Ã¢â‚¬â€ Alt SÃ„Â±nÃ„Â±rÃ„Â± Tam Orta Ãƒâ€¡izgiyle BirleÃ…Å¸ik */
.rack-slot:nth-child(-n+17) {
    z-index: 1;
    transform: translateY(clamp(-6px, -0.4vw, -2px));
}

/* 1. Kat (Ãƒâ€“n / Alt Basamak - Son 17 Slot) Ã¢â‚¬â€ Alt SÃ„Â±nÃ„Â±rÃ„Â± Tam Alt Taban Ãƒâ€¡izgisiyle BirleÃ…Å¸ik */
.rack-slot:nth-child(n+18) {
    z-index: 4;
    transform: translateY(clamp(4px, 0.5vw, 10px));
    filter: drop-shadow(0 -4px 6px rgba(0, 0, 0, 0.7));
}

/* TaÃ…Å¸lar (Tiles) Ã¢â‚¬â€ GerÃƒÂ§ekÃƒÂ§i FildiÃ…Å¸i Melamin & 3D Derin Oyma TasarÃ„Â±mÃ„Â± */
.tile {
    width: 100%;
    left: 0;
    right: 0;
    height: calc(100% + 10px);
    top: 0;
    bottom: -10px;
    background: linear-gradient(185deg, #ffffff 0%, #faf7f0 35%, #eee7d8 80%, #ded6c2 100%);
    border-radius: clamp(5px, 0.6vw, 10px);
    border: 1.5px solid #d4cbb8;
    box-shadow:
        0 clamp(4px, 0.45vw, 8px) 0 #b3a894,
        0 clamp(6px, 0.6vw, 10px) 3px rgba(0, 0, 0, 0.35),
        0 clamp(10px, 1vw, 18px) 20px rgba(0, 0, 0, 0.3),
        inset 0 2.5px 3px rgba(255, 255, 255, 1),
        inset 0 -3px 5px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: clamp(28px, 3.8vw, 76px);
    font-weight: 900;
    cursor: grab;
    position: absolute;
    top: 0;
    transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.12s ease;
    user-select: none;
}

.tile:hover {
    transform: translateY(-8px);
    box-shadow:
        0 12px 0 #b3a894,
        0 13px 3px rgba(0, 0, 0, 0.35),
        0 18px 22px rgba(0, 0, 0, 0.35),
        inset 0 2.5px 4px rgba(255, 255, 255, 1);
    z-index: 5;
}

/* =========================================
   MOBILE LAYOUT REFINEMENTS
   ========================================= */

/* VarsayÃ„Â±lan olarak mobil dizme butonlarÃ„Â±nÃ„Â± gizle */
.mobile-sort-btn {
    display: none !important;
}

@media (max-width: 1400px) {

    /* Yeni mobil butonlarÃ„Â± gÃƒÂ¶ster - Orjinal action-btn boyutlarÃ„Â±nÃ„Â± koru ve SÃ„Â°YAH yap */
    .mobile-sort-btn {
        display: inline-flex !important;
        background: linear-gradient(180deg, #333333 0%, #000000 100%) !important;
        border-color: #000 !important;
        color: white !important;
    }

    /* Eski kocaman butonlarÃ„Â± mobilde gizle */
    .rack-left-panel-btn,
    .rack-right-panel {
        display: none !important;
    }

    /* Deste Kutusunu Istakanın Sağına Yapıştır (Sadece Mobil) */
    .center-board-deck-container {
        position: absolute !important;
        top: auto !important;
        bottom: 20px !important;
        left: auto !important;
        right: clamp(20px, 18.2vw, 350px) !important;
        transform: translateX(100%) scale(1.05) !important;
        transform-origin: left bottom !important;
        z-index: 50 !important;
    }

    .board-indicators {
        flex-direction: column !important;
        gap: 8px !important;
    }
}

.tile.selected {
    transform: translateY(-20px);
    box-shadow:
        0 18px 0 #b3a894,
        0 0 25px rgba(255, 215, 0, 0.95),
        0 20px 28px rgba(0, 0, 0, 0.5);
    border-color: #ffd700;
    z-index: 10;
}

.tile-sm {
    width: 69px;
    height: 106px;
    font-size: 40px;
    position: relative;
    border-radius: 5px;
}

/* Derine GÃƒÂ¶mÃƒÂ¼lÃƒÂ¼ Oyma Rakam (Professional 3D Letterpress Engraving Effect) */
.tile-value {
    line-height: 1;
    margin-bottom: 2px;
    font-size: inherit;
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* Renk SeÃƒÂ§enekleri Ã„Â°ÃƒÂ§in Profesyonel 3D Oyma GÃƒÂ¶lgeleri */
.tile.kirmizi .tile-value,
.tile-sm.kirmizi .tile-value {
    color: #dc2626;
    text-shadow:
        0 1.5px 1.5px rgba(80, 0, 0, 0.5),
        0 -1px 0.5px rgba(255, 255, 255, 0.85),
        1px 2px 3px rgba(0, 0, 0, 0.2);
}

.tile.siyah .tile-value,
.tile-sm.siyah .tile-value {
    color: #0f172a;
    text-shadow:
        0 1.5px 1.5px rgba(0, 0, 0, 0.7),
        0 -1px 0.5px rgba(255, 255, 255, 0.75),
        1px 2px 3px rgba(0, 0, 0, 0.25);
}

.tile.mavi .tile-value,
.tile-sm.mavi .tile-value {
    color: #1d4ed8;
    text-shadow:
        0 1.5px 1.5px rgba(0, 30, 90, 0.5),
        0 -1px 0.5px rgba(255, 255, 255, 0.85),
        1px 2px 3px rgba(0, 0, 0, 0.2);
}

.tile.sari .tile-value,
.tile-sm.sari .tile-value {
    color: #eab308;
    text-shadow:
        0 1.5px 2px rgba(140, 85, 0, 0.7),
        0 -1px 0.5px rgba(255, 255, 255, 0.9),
        1px 2px 3px rgba(0, 0, 0, 0.25);
}

.tile.okey-tile .tile-value {
    color: #ffd700;
    -webkit-text-stroke: 1.5px #000000;
    paint-order: stroke fill;
    font-size: clamp(16px, 2.2vw, 44px);
    font-weight: 900;
    letter-spacing: 0.5px;
    text-shadow:
        0 2px 2px rgba(0, 0, 0, 0.8),
        0 -1px 0.5px rgba(255, 255, 255, 0.8),
        1.5px 2.5px 4px rgba(0, 0, 0, 0.5);
}

.tile-sm.okey-tile .tile-value {
    color: #ffd700;
    -webkit-text-stroke: 0.8px #000000;
    paint-order: stroke fill;
    font-size: clamp(8px, 0.9vw, 13px) !important;
    font-weight: 900;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

.tile.sahte .tile-value {
    color: #ffd700;
    -webkit-text-stroke: 1.2px #000000;
    paint-order: stroke fill;
    font-size: clamp(12px, 1.6vw, 32px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-align: center;
    text-shadow:
        0 2px 2px rgba(0, 0, 0, 0.8),
        0 -1px 0.5px rgba(255, 255, 255, 0.8),
        1.5px 2.5px 4px rgba(0, 0, 0, 0.5);
}

.tile-sm.sahte .tile-value {
    color: #ffd700;
    -webkit-text-stroke: 0.6px #000000;
    paint-order: stroke fill;
    font-size: clamp(7px, 0.75vw, 10px) !important;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.1px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* AÃƒÂ§Ã„Â±k Gri 3D Oyuk / Ãƒâ€¡ukur (2.5 Kat BÃƒÂ¼yÃƒÂ¼tÃƒÂ¼lmÃƒÂ¼Ã…Å¸ AÃƒÂ§Ã„Â±k Gri Derin Ãƒâ€¡ukur) */
.tile-color-dot {
    width: clamp(28px, 2.8vw, 55px);
    height: clamp(28px, 2.8vw, 55px);
    border-radius: 50%;
    margin-top: clamp(2px, 0.3vw, 6px);
    background: radial-gradient(circle at 35% 35%, #e2e8f0 0%, #cbd5e1 75%, #f8fafc 100%) !important;
    box-shadow:
        inset 2px 3.5px 6px rgba(0, 0, 0, 0.4),
        inset -1.5px -1.5px 3px rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

/* Ãƒâ€¡ukurun Merkezindeki SayÃ„Â±yla Birebir AynÃ„Â± Renkteki Nokta */
.tile-color-dot::after {
    content: '';
    width: clamp(12px, 1.2vw, 24px);
    height: clamp(12px, 1.2vw, 24px);
    border-radius: 50%;
    box-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.kirmizi .tile-color-dot::after {
    background-color: #dc2626;
}

.siyah .tile-color-dot::after {
    background-color: #0f172a;
}

.mavi .tile-color-dot::after {
    background-color: #1d4ed8;
}

.sari .tile-color-dot::after {
    background-color: #eab308;
}

.sahte .tile-color-dot::after,
.okey-tile .tile-color-dot::after {
    background-color: #ffd700;
    box-shadow: inset 0 0 0 1px #000000;
}

.tile-sm .tile-color-dot {
    width: 26px;
    height: 26px;
    margin-top: 1px;
}

.tile-sm .tile-color-dot::after {
    width: 12px;
    height: 12px;
}



/* =============================================
   OPPONENT RACKS (3D LOOK)
============================================= */
/* --- SIRA KİMDE GÖSTERGESİ --- */
.rack-wood-texture.active-turn,
.opponent-rack.active-turn {
    box-shadow: 0 0 25px 5px rgba(255, 255, 255, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.5);
    animation: turnPulseWhite 1.5s infinite;
    z-index: 10;
}

@keyframes turnPulseWhite {
    0% { box-shadow: 0 0 15px 4px rgba(255, 255, 255, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.3); outline: 2px solid rgba(255, 255, 255, 0.5); }
    50% { box-shadow: 0 0 40px 12px rgba(255, 255, 255, 1), inset 0 0 25px rgba(255, 255, 255, 0.7); outline: 4px solid rgba(255, 255, 255, 1); }
    100% { box-shadow: 0 0 15px 4px rgba(255, 255, 255, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.3); outline: 2px solid rgba(255, 255, 255, 0.5); }
}

.opponent-rack {
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid transparent; /* To prevent layout shift when border is added */
}

.rack-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rack-content .avatar-img {
    width: 48px;
    height: 48px;
    font-size: 26px;
    line-height: 48px;
    background: linear-gradient(to bottom, #3a2010, #1e0e04);
    border-radius: 50%;
    border: 2px solid #c8882e;
    text-align: center;
    flex-shrink: 0;
}

.rack-content .p-name {
    font-size: 15px;
    font-weight: 800;
    color: #f5d89a;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    text-align: center;
    word-break: break-all;
    line-height: 1.1;
}

.rack-content .p-score {
    font-size: 22px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Top (Horizontal, facing down) */
.opponent-rack.rack-top {
    width: 600px;
    height: 90px;
    background: url('wood.png') repeat center center;
    background-size: cover;
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.25);
    margin: 0 auto 10px auto;
}

.rack-top .rack-content {
    flex-direction: row;
    gap: 25px;
}

.rack-top .rack-content .avatar-img {
    width: 60px;
    height: 60px;
    font-size: 32px;
    line-height: 60px;
}

.rack-top .rack-content .p-name {
    font-size: 20px;
}

.rack-top .rack-content .p-score {
    font-size: 32px;
}

/* Left (Vertical, facing right) */
.opponent-rack.rack-left {
    width: 90px;
    height: 600px;
    background: url('wood.png') repeat center center;
    background-size: cover;
    border-radius: 8px;
    box-shadow: 10px 0 15px rgba(0, 0, 0, 0.6), inset 2px 0 5px rgba(255, 255, 255, 0.25);
    margin: 0 auto 6px auto;
    justify-content: center;
}

.rack-left .rack-content {
    flex-direction: column;
    gap: 20px;
}

.rack-left .rack-content .p-name,
.rack-left .rack-content .p-score {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.rack-left .rack-content .p-name {
    font-size: 22px;
    letter-spacing: 2px;
}

.rack-left .rack-content .p-score {
    font-size: 32px;
}

/* Right (Vertical, facing left) */
.opponent-rack.rack-right {
    width: 90px;
    height: 600px;
    background: url('wood.png') repeat center center;
    background-size: cover;
    border-radius: 8px;
    box-shadow: -10px 0 15px rgba(0, 0, 0, 0.6), inset -2px 0 5px rgba(255, 255, 255, 0.25);
    margin: 0 auto 6px auto;
    justify-content: center;
}

.rack-right .rack-content {
    flex-direction: column;
    gap: 20px;
}

.rack-right .rack-content .p-name,
.rack-right .rack-content .p-score {
    writing-mode: vertical-rl;
}

.rack-right .rack-content .p-name {
    font-size: 22px;
    letter-spacing: 2px;
}

.rack-right .rack-content .p-score {
    font-size: 32px;
}

#hud-player {
    display: none !important;
}

/* Rotate Device Overlay for Mobile */
.rotate-device-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 20, 30, 0.95);
    z-index: 999999;
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(5px);
    flex-direction: column;
}

.rotate-content {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #f4c430;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    max-width: 80%;
}

.rotate-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
    animation: rotate-anim 2s infinite ease-in-out;
}

@keyframes rotate-anim {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(90deg);
    }
}

.rotate-content h2 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #f4c430;
}

.rotate-content p {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Show the overlay only on small screens when in portrait mode and game has started */
@media screen and (max-width: 768px) and (orientation: portrait) {
    body.game-started .rotate-device-overlay {
        display: flex;
    }
}

/* Mobil cihazlarda genel oyun dÃƒÂ¼zeni ayarlamalarÃ„Â± */
@media screen and (max-width: 1024px) {
    body {
        background: url('okeywp_mobil.png') no-repeat center center fixed;
        background-size: cover;
    }

    /* OYUN ALANINI MAKSÃ„Â°MÃ„Â°ZE ET */
    .center-area {
        margin: 0 45px !important;
        /* Oyuncu panellerine ÃƒÂ§arpmayacak kadar boÃ…Å¸luk */
    }

    .green-felt-grid {
        margin: 10px 0px !important;
        /* YÃƒÂ¼ksekliÃ„Å¸i maksimuma ÃƒÂ§Ã„Â±kar */
        overflow: visible !important;
        /* Yan taÃ…Å¸larÃ„Â±n dÃ„Â±Ã…Å¸arÃ„Â± taÃ…Å¸abilmesi iÃƒÂ§in */
    }

    /* 1) Yan taÃ…Å¸larÃ„Â± masanÃ„Â±n tam kÃƒÂ¶Ã…Å¸elerine it (KÃ„Â±rmÃ„Â±zÃ„Â± kutularÃ„Â±n olduÃ„Å¸u yer) */
    #corner-dpile-top-left {
        top: -10px;
        left: -10px;
    }

    #corner-dpile-top-right {
        top: -10px;
        right: -10px;
    }

    #corner-dpile-bottom-left {
        bottom: -110px;
        left: -10px;
    }

    #corner-dpile-bottom-right {
        bottom: -110px;
        right: -10px;
    }

    /* 1 & 2) Alt alanÃ„Â± komple kÃƒÂ¼ÃƒÂ§ÃƒÂ¼lt (Istaka + Aksiyon Ãƒâ€¡ubuÃ„Å¸u) ki butonlar havada asÃ„Â±lÃ„Â± kalmasÃ„Â±n */
    #bottom-area {
        transform-origin: center bottom;
        transform: scale(0.75);
    }

    .rack-wrapper {
        justify-content: center !important;
    }

    /* 3) SaÃ„Å¸ ve sol oyuncu panellerini kenarlara sÃ„Â±fÃ„Â±rla ve dikeyde ortala */
    .player-panel.pos-left {
        transform: translate(0, 32vh) !important;
    }

    .player-panel.pos-right {
        transform: translate(0, 32vh) !important;
    }

    /* 4) Mobil iÃƒÂ§in AÃƒÂ§Ã„Â±lan TaÃ…Å¸larÃ„Â±n (Melds) boyutlarÃ„Â±nÃ„Â± kÃƒÂ¼ÃƒÂ§ÃƒÂ¼lt ve ortaya sÃ„Â±Ã„Å¸dÃ„Â±r */
    .all-melds-container {
        top: 25px;
        /* Oyuncu kutusundan daha aÃ…Å¸aÃ„Å¸Ã„Â± ÃƒÂ§ektik */
        left: 5px;
        right: 5px;
        bottom: -40px;
        /* Alttaki Ã„Â±stakaya (action-center'Ã„Â±n altÃ„Â±na) kadar uzanÃ„Â±r */
        grid-template-columns: auto auto 1fr auto auto;
        grid-template-areas: "p0 p1 . p3 p2";
        grid-template-rows: minmax(0, 1fr);
        /* Row tÃƒÂ¼m yÃƒÂ¼ksekliÃ„Å¸i kaplasÃ„Â±n */
        column-gap: 4px;
        z-index: 20;
    }

    .all-melds-container .meld-list {
        align-items: center;
        overflow-y: auto;
        /* TaÃ…Å¸lar ÃƒÂ§ok olursa kendi iÃƒÂ§inde kaysÃ„Â±n */
        max-height: 100%;
        scrollbar-width: none;
        /* Mobilde scroll ÃƒÂ§ubuÃ„Å¸unu gizle */
    }

    .all-melds-container .tile-sm {
        width: 32px !important;
        height: 48px !important;
        min-height: unset !important;
        font-size: 18px !important;
        border-radius: 4px !important;
        box-shadow: 0 1px 0 var(--tile-shadow) !important;
    }

    .all-melds-container .tile-sm .tile-value {
        font-size: 18px !important;
        margin-top: 2px !important;
    }

    .all-melds-container .tile-sm .tile-color-dot {
        width: 10px !important;
        height: 10px !important;
        margin-bottom: 2px !important;
    }

    .all-melds-container .tile-sm .tile-color-dot::after {
        width: 5px !important;
        height: 5px !important;
    }

    .all-melds-container .meld-group {
        gap: 2px;
        padding: 3px;
        border-radius: 5px;
        margin-bottom: 4px;
    }

    /* 5) Mobil için SERİ AÇ / SERİ DİZ / ÇİFT AÇ / ÇİFT DİZ butonlarını büyüt
       (#bottom-area scale(0.75) ile küçüldüğü için butonlar görsel olarak küçük kalıyor) */
    .btn-open-seri,
    .btn-open-cift,
    .mobile-sort-btn {
        font-size: 20px !important;
        padding: 14px 28px !important;
        border-radius: 12px !important;
        letter-spacing: 0.5px !important;
    }
}

/* Mobil cihazlarda lobi/hazÃ„Â±rlÃ„Â±k ekranÃ„Â±nÃ„Â± kÃƒÂ¼ÃƒÂ§ÃƒÂ¼lt */
@media screen and (max-width: 768px) {
    .glass-panel {
        padding: 20px;
        max-width: 90%;
        border-radius: 16px;
    }

    .game-title {
        font-size: 28px;
    }

    .settings-box {
        padding: 16px;
    }

    .setting-group {
        margin-bottom: 12px;
    }

    .setting-group h4 {
        margin-bottom: 8px;
        font-size: 12px;
    }

    .radio-label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .action-btn.btn-gold.btn-block {
        font-size: 14px;
        padding: 12px;
        margin-top: 12px;
    }

    .status-text {
        font-size: 14px;
        margin-bottom: 12px;
    }

    /* Lobi MasasÃ„Â± Ã„Â°Ã§in Mobil KÃ¼Ã§Ã¼ltme (Ã–rtÃ¼Ã…Å¸meyi Ã–nleme) */
    .lobby-seat-pos {
        width: 80px;
        height: 50px;
        padding: 4px;
    }

    .seat-left {
        left: 5px;
    }

    .seat-right {
        right: 5px;
    }

    .seat-top {
        top: 5px;
    }

    .seat-bottom {
        bottom: 5px;
    }

    .lobby-felt-center {
        width: 90px;
        height: 90px;
        padding: 5px;
    }

    #seat-mode-info {
        font-size: 10px;
    }

    .seat-join-btn {
        font-size: 11px;
        padding: 4px;
    }

    .seat-player-name {
        font-size: 11px;
    }

    .seat-player-status {
        font-size: 9px;
        padding: 2px 6px;
    }

    /* Logo'yu ortadaki siyah kutuya (all-melds-container) gÃƒÂ¶re ortala */
    .green-felt-grid::after {
        position: absolute;
        top: -10px;
        bottom: -110px;
        left: 65px;
        right: 65px;
        width: auto;
        height: auto;
        transform: none;
        background-position: center;
        background-size: 180px;
        /* Logo boyutunu makul bir seviyede tut */
    }
}

/* AT butonu tamamen gizlendi (TaÃ…Å¸ atma iÃ…Å¸lemi saÃ„Å¸daki atÃ„Â±k taÃ…Å¸ havuzuna entegre edildi) */
#btn-discard {
    display: none !important;
}

/* =============================================
   MASAYA AÃƒâ€¡ILAN SERÃ„Â°LER Ã¢â‚¬â€ PRO GRID LAYOUT
   (Oyuncu 1: Sol ÃƒÅ“st | Oyuncu 2: Hemen SaÃ„Å¸Ã„Â±nda | Oyuncu 4: Oyuncu 3'ÃƒÂ¼n Solunda | Oyuncu 3: SaÃ„Å¸ ÃƒÅ“st)
   ============================================= */
.all-melds-container {
    position: absolute;
    top: clamp(-10px, 1vw, 20px);
    bottom: 0px;
    /* 4 panel yan yana ortada - left:50% + transform ile tam merkez */
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    display: grid;
    grid-template-columns: auto auto auto auto;
    grid-template-areas: "p0 p1 p3 p2";
    grid-template-rows: minmax(0, 1fr);
    column-gap: clamp(8px, 1vw, 16px);
    row-gap: clamp(6px, 0.8vw, 12px);
    align-items: stretch;
    pointer-events: none;
    z-index: 20;
}

@media (max-width: 1024px) {
    .all-melds-container {
        bottom: -40px;
    }
}

@media (max-width: 768px) {
    .all-melds-container {
        bottom: -40px;
    }
}

#melds-p0 {
    grid-area: p0;
    pointer-events: auto;
}

#melds-p1 {
    grid-area: p1;
    pointer-events: auto;
}

#melds-p3 {
    grid-area: p3;
    pointer-events: auto;
}

#melds-p2 {
    grid-area: p2;
    pointer-events: auto;
}

.opened-player-card {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), inset 0 0 10px rgba(255, 255, 255, 0.05);
    border-radius: clamp(6px, 0.7vw, 10px);
    padding: clamp(5px, 0.6vw, 10px) clamp(6px, 0.7vw, 12px);
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.5vw, 8px);
    backdrop-filter: blur(12px);
    width: max-content;
    max-width: max-content;
    min-width: max-content;
    height: 100%;
    /* Siyah kutu Ã„Â±zgara alanÃ„Â±nÃ„Â± tam doldursun */
    overflow: hidden;
    /* Siyah kutunun dÃ„Â±Ã…Å¸Ã„Â±na taÃ…Å¸masÃ„Â±nÃ„Â± kesinlikle engelle */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.opened-player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
}

.opened-player-card.is-me {
    border: 1.5px solid rgba(255, 215, 0, 0.7);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.6);
}

.opened-player-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 5px;
}

.opened-player-header .order-badge {
    background: linear-gradient(135deg, #ffd700, #f59e0b);
    color: #0f172a;
    font-weight: 800;
    font-size: clamp(9px, 0.9vw, 11px);
    padding: 2px 7px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
}

.opened-player-header .player-name {
    color: #f8fafc;
    font-weight: 700;
    font-size: clamp(10px, 1vw, 13px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.opened-player-header .open-type-badge {
    font-size: clamp(8px, 0.8vw, 10px);
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: auto;
    letter-spacing: 0.5px;
}

.opened-player-header .open-type-badge.seri {
    background: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.opened-player-header .open-type-badge.cift {
    background: rgba(236, 72, 153, 0.3);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.5);
}

.opened-melds-wrap {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.5vw, 6px);
    flex: 1;
    /* Kutunun iÃƒÂ§indeki tÃƒÂ¼m boÃ…Å¸luÃ„Å¸u doldursun */
    min-height: 0;
    /* Flex container iÃƒÂ§inde taÃ…Å¸mayÃ„Â± engeller */
    overflow-y: auto;
    /* Ã„Â°ÃƒÂ§erik ÃƒÂ§ok olduÃ„Å¸unda sadece bu alan kaysÃ„Â±n (slider) */
    scrollbar-width: none;
}

.opened-melds-wrap::-webkit-scrollbar {
    display: none;
}

/* Ãƒâ€¡ift AÃƒÂ§ma YerleÃ…Å¸imi (Her SatÃ„Â±ra Maksimum 2 Ãƒâ€¡ift - 4 TaÃ…Å¸ GeniÃ…Å¸liÃ„Å¸i) */
.opened-melds-wrap.cift-mode {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: clamp(4px, 0.5vw, 6px);
    align-items: start;
}

.opened-meld-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(3px, 0.4vw, 6px);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 4px 6px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: all 0.2s ease;
}

.opened-meld-group.cift-group {
    flex-direction: column;
    align-items: center;
}

/* ===== TAÃ…Â Ã„Â°Ã…ÂLEME "+" ALANLARI (PROFESYONEL DROP ZONE) ===== */
.meld-add-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1.5px dashed rgba(250, 204, 21, 0.55);
    border-radius: clamp(3px, 0.4vw, 6px);
    color: #facc15;
    font-size: clamp(14px, 1.5vw, 20px);
    font-weight: 900;
    cursor: pointer;
    user-select: none;
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.4, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Sol ve SaÃ„Å¸ Ã„Â°ndikatÃƒÂ¶rleri (Seri ve Gruplar Ã„Â°ÃƒÂ§in) */
.meld-add-zone-left,
.meld-add-zone-right {
    width: clamp(20px, 2vw, 30px);
    height: clamp(32px, 3vw, 48px);
}

/* Ãƒâ€¡ift GruplarÃ„Â± Ã„Â°ÃƒÂ§in Alt Ã„Â°ndikatÃƒÂ¶r */
.meld-add-zone-bottom,
.cift-add-zone-bottom {
    width: 100%;
    height: clamp(18px, 1.8vw, 26px);
    margin-top: 2px;
}

.meld-add-zone:hover {
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.3) 0%, rgba(202, 138, 4, 0.3) 100%);
    border-color: #facc15;
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

.meld-add-zone:active {
    transform: scale(0.95);
}

/* SÃƒÂ¼rÃƒÂ¼kleme esnasÃ„Â±nda aktif drop zone parlamasÃ„Â± */
.meld-add-zone.drag-over {
    background: rgba(34, 197, 94, 0.35) !important;
    border: 2px solid #4ade80 !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(74, 222, 128, 0.95) !important;
    transform: scale(1.15) !important;
    animation: addZoneGlow 1s infinite alternate;
}

@keyframes addZoneGlow {
    0% {
        box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
    }

    100% {
        box-shadow: 0 0 18px rgba(74, 222, 128, 1);
    }
}

.opened-meld-rows {
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.4vw, 5px);
}

.opened-meld-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(2px, 0.3vw, 4px);
}

/* Masaya AÃƒÂ§Ã„Â±lan TaÃ…Å¸ Boyutu & 3D FildiÃ…Å¸i Dokusu (Design System ile Birebir Uyumlu) */
.opened-meld-group .tile-sm {
    aspect-ratio: 27 / 40;
    width: clamp(26px, 2.5vw, 42px);
    height: auto;
    min-height: unset;
    background: linear-gradient(185deg, #ffffff 0%, #faf7f0 35%, #eee7d8 80%, #ded6c2 100%);
    border: 1.2px solid #d4cbb8;
    border-radius: clamp(3px, 0.4vw, 6px);
    box-shadow:
        0 clamp(2px, 0.25vw, 4px) 0 #b3a894,
        0 clamp(3px, 0.35vw, 6px) 2px rgba(0, 0, 0, 0.35),
        inset 0 1.5px 2px rgba(255, 255, 255, 1);
    font-size: clamp(13px, 1.4vw, 20px);
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.opened-meld-group .tile-sm:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

/* Ã„Â°Ã…Å¸lenebilir taÃ…Å¸ vurgusu */
.tile-sm.meld-tile.addable {
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.9) !important;
    border-color: #4ade80 !important;
}

/* =============================================
   Ã„Â°Ã…ÂLEK TAÃ…Â PARLAMA (YARDIMLI MOD) - Ã„Â°NCE MAVÃ„Â° HÃƒÅ“ZME
============================================= */
.tile.playable-glow {
    box-shadow: 0 0 6px 2px rgba(0, 191, 255, 0.7), inset 0 0 4px rgba(0, 191, 255, 0.4) !important;
    border: 1.5px solid rgba(0, 191, 255, 0.85) !important;
    animation: islekGlowPulse 2.5s infinite ease-in-out;
}

@keyframes islekGlowPulse {

    0%,
    100% {
        box-shadow: 0 0 5px 1.5px rgba(0, 191, 255, 0.55), inset 0 0 3px rgba(0, 191, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 9px 2.5px rgba(0, 191, 255, 0.85), inset 0 0 5px rgba(0, 191, 255, 0.5);
    }
}

/* Ãƒâ€¡ift AÃƒÂ§Ã„Â±lÃ„Â±Ã…Å¸larÃ„Â±nda KartÃ„Â±n AltÃ„Â±ndaki Tek GeniÃ…Å¸ "+" Butonu */
.cift-single-add-zone {
    width: 100%;
    margin-top: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%);
    border: 1.5px dashed rgba(34, 197, 94, 0.6);
    border-radius: 8px;
    color: #4ade80;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cift-single-add-zone:hover,
.cift-single-add-zone.drag-over {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.45) 0%, rgba(16, 185, 129, 0.35) 100%);
    border-style: solid;
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
    transform: translateY(-1px);
}

/* =============================================
   CANLI CEZA BÃ„Â°LDÃ„Â°RÃ„Â°MÃ„Â° (PENALTY TOAST SYSTEM)
============================================= */
.penalty-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.penalty-toast-card {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(30, 10, 10, 0.95) 0%, rgba(60, 15, 15, 0.95) 100%);
    border: 2px solid #ef4444;
    border-radius: 12px;
    box-shadow:
        0 0 20px rgba(233, 50, 50, 0.6),
        0 10px 25px rgba(0, 0, 0, 0.8),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    animation: penaltyPopDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 480px;
}

.penalty-toast-card.fade-out {
    animation: penaltySlideUp 0.4s ease forwards;
}

.penalty-toast-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    animation: penaltyShake 0.5s ease-in-out 0.2s;
}

.penalty-toast-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.penalty-toast-title {
    font-size: 15px;
    font-weight: 800;
    color: #fca5a5;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.penalty-toast-title b {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.penalty-toast-badge {
    display: inline-block;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 4px;
    margin-left: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.penalty-toast-reason {
    font-size: 12px;
    color: #cbd5e1;
    font-weight: 500;
    opacity: 0.95;
}

@keyframes penaltyPopDown {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.85);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes penaltySlideUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
}

@keyframes penaltyShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-4px);
    }

    40%,
    80% {
        transform: translateX(4px);
    }
}

/* Oyuncu koltuk kÃ„Â±rmÃ„Â±zÃ„Â± ceza parlamasÃ„Â± */
.seat-penalty-flash {
    animation: seatPenaltyPulse 1s 2 ease-in-out !important;
}

@keyframes seatPenaltyPulse {

    0%,
    100% {
        box-shadow: 0 0 0 transparent;
    }

    50% {
        box-shadow: 0 0 25px 8px rgba(239, 68, 68, 0.95), inset 0 0 15px rgba(239, 68, 68, 0.8) !important;
        border-color: #ef4444 !important;
    }
}

/* Sahte Okey Rozeti & Stili */
.tile.sahte-tile {
    border: 2px dashed #eab308 !important;
    position: relative;
}

.sahte-badge {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #000000;
    font-size: clamp(8px, 0.7vw, 11px);
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 5;
}

/* ===== MOBÄ°L YATAY EKRAN UYARISI ===== */
#landscape-warning {
    display: none;
}

@media (orientation: portrait) {

    body.game-started #landscape-warning,
    body.game-started .rotate-device-overlay,
    #screen-game:not(.hidden)~#landscape-warning,
    #screen-game:not(.hidden)~.rotate-device-overlay {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: linear-gradient(135deg, #0f172a 0%, #020617 100%) !important;
        z-index: 9999999 !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        color: white !important;
        text-align: center !important;
        padding: 20px !important;
    }

    body.game-started #landscape-warning .phone-icon {
        font-size: 80px;
        margin-bottom: 30px;
        animation: rotatePhone 2s infinite ease-in-out;
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
    }

    body.game-started #landscape-warning h2 {
        font-size: 26px;
        font-weight: 800;
        margin-bottom: 12px;
        color: #ffd700;
        text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
        letter-spacing: -0.5px;
    }

    body.game-started #landscape-warning p {
        font-size: 16px;
        color: #94a3b8;
        max-width: 85%;
        line-height: 1.5;
    }
}

@keyframes rotatePhone {
    0% {
        transform: rotate(0deg);
    }

    40% {
        transform: rotate(-90deg);
    }

    60% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* =============================================
   Ekran Döndürme Uyarısı (Dikey Mod - Yalnızca Oyun Sırasında)
============================================= */
#rotate-overlay {
    display: none; /* Varsayılan: gizli */
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0f172a 0%, #1a2744 50%, #0f172a 100%);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Yalnızca oyun başladıktan sonra, mobil cihazlarda, dikey modda göster */
@media screen and (max-width: 1024px) and (orientation: portrait) {
    body.game-started #rotate-overlay {
        display: flex;
    }
}

.rotate-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 32px;
    text-align: center;
    max-width: 360px;
}

.rotate-phone-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 40px rgba(99, 179, 237, 0.2);
    font-size: 56px;
    line-height: 1;
    animation: rotate-hint 2.4s ease-in-out infinite;
    user-select: none;
}

@keyframes rotate-hint {
    0%   { transform: rotate(0deg); }
    30%  { transform: rotate(-88deg); }
    60%  { transform: rotate(-88deg); }
    100% { transform: rotate(0deg); }
}

.rotate-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 12px rgba(99, 179, 237, 0.4);
}

.rotate-desc {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.7;
}

/* ── ULTRA-PREMIUM FLOATING (i) BUTTON & MODAL ── */
.global-how-to-btn {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: calc(20px + env(safe-area-inset-right, 0px));
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3d2f09 0%, #1c1503 70%, #0a0701 100%);
  border: 2px solid #e1b12c;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.75),
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -2px 6px rgba(0, 0, 0, 0.8),
    0 0 16px rgba(225, 177, 44, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999999;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease, border-color 0.25s ease;
  user-select: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.how-to-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e1b12c;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  transition: color 0.25s ease, transform 0.25s ease;
}

.how-to-icon {
  stroke: #e1b12c;
  transition: stroke 0.25s ease, transform 0.25s ease;
}

.global-how-to-btn:hover {
  transform: translateY(-3px) scale(1.1);
  border-color: #ffffff;
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.85),
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    0 0 25px rgba(225, 177, 44, 0.6);
}

.global-how-to-btn:hover .how-to-icon {
  stroke: #ffffff;
  transform: scale(1.1);
}

.global-how-to-btn:active {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

/* Ambient Pulsing Aura Effect */
.btn-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(225, 177, 44, 0.35);
  animation: auraPulse 2.8s infinite cubic-bezier(0.45, 0, 0.55, 1);
.info-circle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(225, 177, 44, 0.2);
    border: 1.5px solid #e1b12c;
    color: #e1b12c;
    font-weight: bold;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.info-circle-btn:hover {
    background: #e1b12c;
    color: #000;
    transform: scale(1.1);
}

@keyframes auraPulse {
  0% { transform: scale(0.92); opacity: 0.85; }
  50% { transform: scale(1.18); opacity: 0.15; }
  100% { transform: scale(0.92); opacity: 0.85; }
}

.global-how-to-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999999;
  padding: 15px;
  animation: fadeInHowToModal 0.25s ease-out forwards;
}

.global-how-to-modal.hidden {
  display: none !important;
}

.global-how-to-box {
  background: linear-gradient(165deg, #241b05 0%, #0d0a02 100%);
  border: 2px solid #e1b12c;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 0 18px rgba(225, 177, 44, 0.25);
  color: #f8fafc;
  padding: 26px 28px;
  border-radius: 20px;
  width: min(92vw, 530px);
  position: relative;
  max-height: calc(88vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: 'Outfit', 'Inter', 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */}

.global-how-to-box::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
.global-how-to-box::-webkit-scrollbar-thumb {
  display: none !important;
}

.global-how-to-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #e1b12c;
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.global-how-to-close:hover {
  color: #ffffff;
  transform: scale(1.15);
}

.global-how-to-title {
  color: #e1b12c;
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 4px 0;
  letter-spacing: 0.4px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  font-family: inherit;
}

.global-how-to-subtitle {
  color: #cbd5e1;
  font-size: 0.88rem;
  text-align: center;
  margin: 0 0 20px 0;
  font-weight: 500;
  letter-spacing: 0.2px;
  opacity: 0.95;
  font-family: inherit;
}

.global-how-to-content .rules-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(225, 177, 44, 0.25);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.global-how-to-content h4 {
  color: #e1b12c;
  font-size: 1.02rem;
  margin: 0 0 10px 0;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-family: inherit;
}

.global-how-to-content p {
  font-size: 0.93rem;
  line-height: 1.65;
  color: #f1f5f9;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.15px;
  font-family: inherit;
}

.global-how-to-content ul, .global-how-to-content ol {
  margin: 0;
  padding-left: 22px;
  font-size: 0.92rem;
  color: #f1f5f9;
  line-height: 1.68;
  font-weight: 400;
  letter-spacing: 0.15px;
  font-family: inherit;
}

.global-how-to-content li {
  margin-bottom: 8px;
}

.global-how-to-content li strong {
  color: #ffffff;
  font-weight: 700;
}

.global-how-to-content li:last-child {
  margin-bottom: 0;
}

@keyframes fadeInHowToModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ── MOBİL / DİK / YATIK EKRAN UYUMLULUĞU ── */
@media (max-width: 600px) {
  .global-how-to-btn {
    width: 44px;
    height: 44px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    right: calc(14px + env(safe-area-inset-right, 0px));
  }
  .how-to-icon {
    width: 20px;
    height: 20px;
  }
  .global-how-to-box {
    padding: 20px 20px;
    border-radius: 16px;
  
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */}
  .global-how-to-title {
    font-size: 1.2rem;
  }
  .global-how-to-content .rules-section {
    padding: 12px 14px;
    margin-bottom: 12px;
  }
  .global-how-to-content p, .global-how-to-content ul, .global-how-to-content ol {
    font-size: 0.88rem;
    line-height: 1.6;
  }
}

@media (max-height: 500px) {
  .global-how-to-btn {
    width: 40px;
    height: 40px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
  }
  .how-to-icon {
    width: 18px;
    height: 18px;
  }
  .global-how-to-box {
    max-height: 90vh;
    padding: 16px 18px;
  
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */}
}

/* ── LANDSCAPE ENGELLEYİCİ (Masaüstü ve Dik Mobilde Gizli, Sadece Mobil Yatık Ekranda Görünür) ── */
#landscape-blocker {
  display: none !important;
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  #landscape-blocker {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 3, 23, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    padding: 20px;
  }
  #landscape-blocker .rotate-icon {
    font-size: 3rem;
    color: #ffde00;
    margin-bottom: 12px;
    animation: rotatePhone 2s infinite ease-in-out;
  }
  #landscape-blocker h2 {
    font-size: 1.4rem;
    color: #ffde00;
    margin-bottom: 6px;
    font-weight: 800;
  }
  #landscape-blocker p {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin: 0;
  }
}

@keyframes rotatePhone {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}
