/* =====================================================
   OKEY 101 - PROFESSIONAL GAME STYLES
   ===================================================== */

/* CSS Değişkenleri */
:root {
    --table-green: #0d4f3c;
    --table-dark: #0a3d2f;
    --table-light: #147553;
    --gold: #d4af37;
    --gold-light: #f0d77a;
    --wood-dark: #3d2817;
    --wood-light: #6b4423;
    --wood-medium: #5c3a21;

    --stone-white: #fefefe;
    --stone-shadow: rgba(0, 0, 0, 0.35);

    --red: #dc2626;
    --blue: #2563eb;
    --black: #1f2937;
    --yellow: #eab308;

    --accent-cyan: #06b6d4;
    --accent-purple: #a855f7;

    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);

    /* Taş boyutları - Desktop (kompakt) */
    --stone-width: 36px;
    --stone-height: 52px;
    --stone-font: 22px;
    --mini-stone-width: 26px;
    --mini-stone-height: 38px;
    --mini-stone-font: 14px;

    /* Istaka grid */
    --hand-columns: 15;
    --hand-rows: 2;
    --hand-gap: 4px 3px;
    --hand-padding: 12px 16px 10px;
}

/* Genel Sayfa */
.okey-game-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 50%, #0d1b2a 100%);
    position: relative;
    overflow: hidden;
}

.okey-game-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 80% at 50% 100%, rgba(13, 79, 60, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* =====================================================
   TAŞ TASARIMI
   ===================================================== */

.stone {
    width: var(--stone-width);
    height: var(--stone-height);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 50%, #e8e8e8 100%);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Georgia', serif;
    font-size: var(--stone-font);
    font-weight: 800;
    cursor: grab;
    user-select: none;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    touch-action: none;
    /* Touch sürüklemesi için */

    /* 3D Taş Efekti */
    box-shadow:
        0 2px 0 #d0d0d0,
        0 4px 0 #b8b8b8,
        0 6px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.stone::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    height: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
    border-radius: 4px 4px 0 0;
}

.stone:hover {
    transform: translateY(-8px) scale(1.08);
    z-index: 100;
    box-shadow:
        0 2px 0 #d0d0d0,
        0 4px 0 #b8b8b8,
        0 16px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(212, 175, 55, 0.3);
}

.stone:active {
    cursor: grabbing;
    transform: translateY(-4px) scale(1.05);
}

/* Taş Renkleri */
.stone.red {
    color: var(--red);
    text-shadow: 0 1px 2px rgba(220, 38, 38, 0.3);
}

.stone.red::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: var(--red);
    border-radius: 2px;
}

.stone.blue {
    color: var(--blue);
    text-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}

.stone.blue::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: var(--blue);
    border-radius: 2px;
}

.stone.black {
    color: var(--black);
    text-shadow: 0 1px 2px rgba(31, 41, 55, 0.3);
}

.stone.black::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: var(--black);
    border-radius: 2px;
}

.stone.yellow {
    color: var(--yellow);
    text-shadow: 0 1px 2px rgba(234, 179, 8, 0.3);
}

.stone.yellow::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: var(--yellow);
    border-radius: 2px;
}

/* Joker Taş */
.stone.joker {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 50%, #f59e0b 100%);
    color: #78350f;
}

/* Okey Taşı Parlama */
.stone.is-okey {
    animation: okey-pulse 2s infinite;
    box-shadow:
        0 2px 0 #d0d0d0,
        0 4px 0 #b8b8b8,
        0 6px 12px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(168, 85, 247, 0.6),
        0 0 30px rgba(168, 85, 247, 0.3);
}

@keyframes okey-pulse {

    0%,
    100% {
        box-shadow: 0 2px 0 #d0d0d0, 0 4px 0 #b8b8b8, 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 15px rgba(168, 85, 247, 0.6);
    }

    50% {
        box-shadow: 0 2px 0 #d0d0d0, 0 4px 0 #b8b8b8, 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 25px rgba(168, 85, 247, 0.8);
    }
}

/* Mini Taşlar (Masa üzeri) */
.mini-stone {
    width: var(--mini-stone-width) !important;
    height: var(--mini-stone-height) !important;
    font-size: var(--mini-stone-font) !important;
    margin-right: -6px;
}

.mini-stone::before {
    display: none;
}

.mini-stone::after {
    height: 3px !important;
    left: 5px !important;
    right: 5px !important;
    bottom: 3px !important;
}

/* =====================================================
   ISTAKA (EL) - 15x2 GRID
   ===================================================== */

#my-hand {
    display: grid;
    grid-template-columns: repeat(var(--hand-columns), calc(var(--stone-width) + 2px));
    grid-template-rows: repeat(var(--hand-rows), calc(var(--stone-height) + 6px));
    gap: var(--hand-gap);
    padding: var(--hand-padding);

    /* Ahşap Istaka Görünümü */
    background:
        linear-gradient(180deg, var(--wood-light) 0%, var(--wood-medium) 20%, var(--wood-dark) 100%);
    border-radius: 16px 16px 8px 8px;
    border: 3px solid var(--wood-dark);
    border-top: 4px solid var(--gold);

    /* 3D Perspektif - Mobilde devre dışı */
    perspective: 1000px;
    transform: rotateX(8deg);
    transform-origin: center bottom;

    box-shadow:
        0 8px 0 var(--wood-dark),
        0 16px 40px rgba(0, 0, 0, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);

    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
}

.stone-slot {
    width: var(--stone-width);
    height: var(--stone-height);
    border: 2px dashed rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.stone-slot:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.stone-slot.drag-over {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.3);
}

/* =====================================================
   OYUNCU PANELLERİ
   ===================================================== */

.player-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.player-panel .player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.player-panel .player-name {
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.player-panel .player-info {
    color: #9ca3af;
    font-size: 10px;
    font-family: monospace;
}

.player-panel.active-turn {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    transform: scale(1.02);
}

.player-panel.active-turn .player-avatar {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* Kompakt Oyuncu Paneli */
.player-panel.compact {
    padding: 8px 12px;
    border-radius: 10px;
}

.player-panel.compact.horizontal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-panel.compact.vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
}

.player-panel.compact .player-name {
    font-size: 10px;
    margin-bottom: 0;
}

.player-panel.compact .player-info {
    font-size: 9px;
}

.player-avatar.small {
    width: 28px;
    height: 28px;
    margin: 0;
}

.player-avatar.small i {
    width: 14px;
    height: 14px;
}

/* Kompakt Bilgi Paneli */
.info-panel.compact {
    position: static;
    padding: 8px 12px;
    gap: 12px;
}

.info-panel.compact .info-item .label {
    font-size: 8px;
}

/* Kompakt Discard Area */
.discard-area.compact {
    padding: 4px;
}

.discard-area.compact .discard-pile {
    min-height: 40px;
}

.discard-area.compact .discard-label {
    font-size: 8px;
}

/* Kompakt Discard Zone */
#discard-zone.compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    min-height: 60px;
    background: rgba(220, 38, 38, 0.1);
    border: 2px dashed rgba(220, 38, 38, 0.4);
    border-radius: 10px;
    color: rgba(220, 38, 38, 0.7);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Kompakt Kontrol Paneli */
.control-panel.compact {
    padding: 10px 16px;
    border-radius: 12px;
    justify-content: center;
}

.game-btn.small {
    padding: 8px 12px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =====================================================
   MERKEZ MASA ALANI
   ===================================================== */

#game-table {
    background:
        radial-gradient(ellipse at center, var(--table-light) 0%, var(--table-green) 40%, var(--table-dark) 100%);
    border: 4px solid var(--wood-dark);
    border-radius: 16px;
    padding: 12px;
    min-height: 100px;
    position: relative;
    overflow-y: auto;

    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.5);
}

#game-table::before {
    content: 'OKEY 101';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    letter-spacing: 6px;
    pointer-events: none;
}

.meld-group {
    display: flex;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 4px;
}

.meld-owner {
    font-size: 10px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =====================================================
   KONTROL PANELİ
   ===================================================== */

.control-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.score-display {
    font-family: 'Georgia', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.game-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.game-btn.primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.game-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.game-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.2);
}

.game-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.game-btn.accent {
    background: linear-gradient(135deg, var(--accent-purple) 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.game-btn.accent:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* =====================================================
   ISKARTA ALANLARI
   ===================================================== */

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

.discard-pile {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    min-height: 80px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.discard-pile .stone {
    margin-top: -40px;
    transform: rotate(var(--rotate, 0deg));
}

.discard-pile .stone:first-child {
    margin-top: 0;
}

.discard-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
}

.discard-area.can-take .discard-pile {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.discard-area.can-take .discard-label {
    color: var(--gold);
}

/* Taş Atma Bölgesi */
#discard-zone {
    background: rgba(220, 38, 38, 0.1);
    border: 3px dashed rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

#discard-zone:hover {
    border-color: var(--red);
    background: rgba(220, 38, 38, 0.15);
}

#discard-zone.drag-over {
    border-color: var(--red);
    background: rgba(220, 38, 38, 0.2);
    transform: scale(1.02);
}

/* =====================================================
   BİLGİ PANELİ
   ===================================================== */

.info-panel {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 50;
    display: flex;
    gap: 12px;
}

.info-item {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.info-item .label {
    font-size: 9px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* =====================================================
   SONUÇ MODAL
   ===================================================== */

#results-modal {
    backdrop-filter: blur(16px);
}

.results-card {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.2);
}

.results-title {
    text-align: center;
    margin-bottom: 24px;
}

.results-title h2 {
    font-size: 32px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    margin: 0;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-row.winner {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
}

.score-row .player-name {
    color: #e5e7eb;
    font-weight: 600;
}

.score-row .score {
    font-size: 20px;
    font-weight: 800;
    font-family: monospace;
}

.score-row .score.positive {
    color: #ef4444;
}

.score-row .score.negative {
    color: var(--gold);
}

/* =====================================================
   ANİMASYONLAR
   ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

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

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

@keyframes pulse {

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

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

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Taş Sürükleme */
.stone.dragging {
    opacity: 0.7;
    transform: scale(0.95) rotate(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* =====================================================
   RESPONSIVE - TABLET (768px)
   ===================================================== */

@media (max-width: 1200px) {
    :root {
        --stone-width: 38px;
        --stone-height: 54px;
        --stone-font: 22px;
        --mini-stone-width: 28px;
        --mini-stone-height: 38px;
        --mini-stone-font: 14px;
        --hand-gap: 4px 3px;
        --hand-padding: 16px 20px 12px;
    }
}

@media (max-width: 900px) {
    :root {
        --stone-width: 34px;
        --stone-height: 48px;
        --stone-font: 20px;
        --hand-columns: 11;
        --hand-rows: 3;
        --hand-gap: 4px 3px;
        --hand-padding: 12px 16px 10px;
    }

    /* Masa layout'u dikeye döner */
    .grid-cols-12 {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .col-span-2,
    .col-span-8 {
        width: 100% !important;
    }

    /* Sol ve sağ oyuncuları yatay sırala */
    .col-span-2 {
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: flex-start !important;
        padding: 0 10px;
    }

    /* Bilgi Paneli */
    .info-panel {
        position: relative;
        top: auto;
        left: auto;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 8px;
        gap: 8px;
    }

    .info-item {
        padding: 8px 12px;
    }

    .info-item .label {
        font-size: 8px;
    }

    /* Game Table küçült */
    #game-table {
        min-height: 160px;
        padding: 16px;
        border-radius: 16px;
    }

    #game-table::before {
        font-size: 28px;
    }

    /* Oyuncu Panelleri */
    .player-panel {
        padding: 10px;
        border-radius: 12px;
    }

    .player-panel .player-avatar {
        width: 36px;
        height: 36px;
        margin-bottom: 4px;
    }

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

    .player-panel .player-info {
        font-size: 9px;
    }

    /* Kontrol Paneli - Dikeye dön */
    .control-panel {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .control-panel>div:last-child {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .game-btn {
        padding: 8px 14px;
        font-size: 11px;
    }

    /* Istaka 3D efekti kapat */
    #my-hand {
        transform: none;
        perspective: none;
        border-radius: 12px 12px 6px 6px;
    }

    /* Iskarta alanları */
    .discard-pile {
        min-height: 60px;
        padding: 6px;
    }

    .discard-area {
        gap: 4px;
    }

    /* Taş atma bölgesi */
    #discard-zone {
        min-height: 80px !important;
        padding: 16px;
    }
}

/* =====================================================
   RESPONSIVE - MOBİL (480px)
   ===================================================== */

@media (max-width: 480px) {
    :root {
        --stone-width: 28px;
        --stone-height: 40px;
        --stone-font: 16px;
        --mini-stone-width: 22px;
        --mini-stone-height: 32px;
        --mini-stone-font: 11px;
        --hand-columns: 8;
        --hand-rows: 4;
        --hand-gap: 3px 2px;
        --hand-padding: 8px 10px 6px;
    }

    /* Container padding azalt */
    .container {
        padding: 8px !important;
    }

    /* Bilgi Paneli Kompakt */
    .info-panel {
        gap: 6px;
    }

    .info-item {
        padding: 6px 8px;
        border-radius: 8px;
    }

    .info-item .label {
        font-size: 7px;
        margin-bottom: 4px;
    }

    /* Oyuncu Panelleri Extra Kompakt */
    .player-panel {
        padding: 8px;
        border-radius: 10px;
    }

    .player-panel .player-avatar {
        width: 28px;
        height: 28px;
    }

    .player-panel .player-name {
        font-size: 10px;
    }

    .player-panel .player-info {
        font-size: 8px;
    }

    /* Masa */
    #game-table {
        min-height: 120px;
        padding: 10px;
        border-radius: 12px;
        border-width: 4px;
    }

    #game-table::before {
        font-size: 20px;
        letter-spacing: 4px;
    }

    /* Meld grupları */
    .meld-group {
        padding: 6px 8px;
        border-radius: 8px;
        margin: 2px;
    }

    .meld-owner {
        font-size: 8px;
        margin-bottom: 4px;
    }

    /* Kontrol Paneli */
    .control-panel {
        padding: 10px 12px;
        border-radius: 12px;
        gap: 8px;
    }

    .score-display {
        font-size: 14px;
    }

    #turn-indicator {
        font-size: 9px;
    }

    .game-btn {
        padding: 6px 10px;
        font-size: 10px;
        border-radius: 8px;
    }

    /* Istaka */
    #my-hand {
        border-width: 2px;
        border-top-width: 3px;
        border-radius: 10px 10px 4px 4px;
    }

    .stone-slot {
        border-width: 1px;
        border-radius: 4px;
    }

    /* Taş Efektleri Mobil */
    .stone {
        border-radius: 4px;
    }

    .stone::before {
        height: 5px;
        top: 2px;
        left: 2px;
        right: 2px;
    }

    .stone::after {
        height: 2px !important;
        left: 4px !important;
        right: 4px !important;
        bottom: 2px !important;
    }

    /* Hover efektlerini mobilde azalt */
    .stone:hover {
        transform: translateY(-4px) scale(1.05);
    }

    /* Iskarta alanları */
    .discard-pile {
        min-height: 50px;
        border-radius: 8px;
        padding: 4px;
    }

    .discard-pile .stone {
        margin-top: -30px;
    }

    .discard-label {
        font-size: 8px;
    }

    /* Taş atma bölgesi */
    #discard-zone {
        min-height: 60px !important;
        padding: 12px;
        border-radius: 12px;
    }

    #discard-zone i {
        width: 24px !important;
        height: 24px !important;
    }

    #discard-zone span {
        font-size: 9px !important;
    }

    /* Lobby ekranı */
    #lobby-screen h1 {
        font-size: 2.5rem !important;
    }

    #lobby-screen .game-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    #lobby-screen .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    /* Sonuç modalı */
    .results-card {
        padding: 20px;
        border-radius: 16px;
        max-width: 95%;
    }

    .results-title h2 {
        font-size: 24px;
    }

    .score-row {
        padding: 12px;
        border-radius: 8px;
    }

    .score-row .score {
        font-size: 16px;
    }
}

/* =====================================================
   MOBİL YARDIMCI SINIFLAR
   ===================================================== */

/* Touch cihazlar için dokunma alanı genişletme */
@media (hover: none) and (pointer: coarse) {
    .game-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .stone {
        cursor: pointer;
    }

    .stone:hover {
        transform: none;
    }

    .stone:active {
        transform: scale(0.95);
    }
}

/* Landscape mobil için özel düzen */
@media (max-height: 500px) and (orientation: landscape) {
    .info-panel {
        flex-direction: row;
        gap: 12px;
    }

    #my-hand {
        --hand-columns: 15;
        --hand-rows: 2;
    }

    #game-table {
        min-height: 100px;
    }
}

/* Eski Uyumluluk */
.active-turn {
    box-shadow: 0 0 25px var(--gold) !important;
    border-color: var(--gold) !important;
}

.brand-font {
    font-family: 'Georgia', serif;
    font-weight: 900;
}

/* =====================================================
   MULTIPLAYER BEKLEME EKRANI
   ===================================================== */

.bg-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
}

.player-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.player-slot.ready {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.player-slot .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #9ca3af;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.player-slot .avatar.waiting {
    animation: pulse 2s infinite;
}

.player-slot.ready .avatar {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #22c55e;
}

.player-slot .name {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.player-slot.ready .name {
    color: #22c55e;
    font-weight: 600;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* =====================================================
   MOBİL ÖZEL TASARIM
   ===================================================== */

/* Mobil Layout Gizle/Göster */
@media (min-width: 768px) {
    .mobile-layout {
        display: none !important;
    }

    .desktop-layout {
        display: flex !important;
    }
}

@media (max-width: 767px) {
    .mobile-layout {
        display: flex !important;
    }

    .desktop-layout {
        display: none !important;
    }
}

/* =====================================================
   MOBİL ÜST BAR
   ===================================================== */

.mobile-top-bar {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

/* Bilgi Satırı */
.mobile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

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

.mobile-info-item.score {
    flex-direction: row;
    gap: 2px;
}

.mobile-info-label {
    font-size: 8px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-info-value {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-info-value .stone {
    width: 24px !important;
    height: 34px !important;
    font-size: 12px !important;
}

.mobile-score {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold);
    font-family: 'Georgia', serif;
}

/* Oyuncu Avatarları Satırı */
.mobile-players-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.mobile-player.active-turn {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.mobile-player-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.mobile-player-avatar.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.mobile-player-avatar.purple {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}

.mobile-player-avatar.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.mobile-player-stones {
    font-size: 11px;
    font-weight: 700;
    color: #e5e7eb;
    font-family: monospace;
}

/* =====================================================
   MOBİL ORTA ALAN
   ===================================================== */

.mobile-middle-area {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    padding: 8px;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* Sıra Göstergesi */
.mobile-turn-badge {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    color: #9ca3af;
    border: 1px solid var(--glass-border);
    z-index: 10;
    white-space: nowrap;
}

/* Yandan Alınabilir Taş */
.mobile-side-discard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 50px;
    flex-shrink: 0;
}

.mobile-discard-pile {
    min-height: 50px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-end;
    padding: 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.mobile-discard-pile.can-take {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.mobile-discard-pile .stone {
    width: 28px !important;
    height: 40px !important;
    font-size: 14px !important;
    margin-top: -25px;
}

.mobile-discard-pile .stone:first-child {
    margin-top: 0;
}

.mobile-discard-label {
    font-size: 8px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Mobil Masa */
.mobile-table {
    flex: 1;
    background:
        radial-gradient(ellipse at center, var(--table-light) 0%, var(--table-green) 40%, var(--table-dark) 100%);
    border: 3px solid var(--wood-dark);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 4px;
    overflow-y: auto;
    min-height: 0;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.mobile-table .meld-group {
    padding: 4px 6px;
    border-radius: 6px;
    margin: 2px;
}

.mobile-table .mini-stone {
    width: 22px !important;
    height: 32px !important;
    font-size: 11px !important;
    margin-right: -4px;
}

/* Taş Atma Bölgesi */
.mobile-discard-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 50px;
    flex-shrink: 0;
    background: rgba(220, 38, 38, 0.1);
    border: 2px dashed rgba(220, 38, 38, 0.4);
    border-radius: 12px;
    color: rgba(220, 38, 38, 0.7);
    transition: all 0.3s ease;
}

.mobile-discard-drop span {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.mobile-discard-drop.drag-over,
.mobile-discard-drop:active {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--red);
    color: var(--red);
    transform: scale(1.05);
}

/* =====================================================
   MOBİL ISTAKA ALANI
   ===================================================== */

.mobile-hand-area {
    flex-shrink: 0;
    padding: 8px;
    padding-bottom: 4px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
}

.mobile-hand {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 2px;
    padding: 8px 6px;
    background:
        linear-gradient(180deg, var(--wood-light) 0%, var(--wood-medium) 30%, var(--wood-dark) 100%);
    border-radius: 10px 10px 4px 4px;
    border: 2px solid var(--wood-dark);
    border-top: 3px solid var(--gold);
    box-shadow:
        0 4px 0 var(--wood-dark),
        0 8px 20px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    overflow-x: auto;
}

.mobile-hand .stone {
    width: 100%;
    aspect-ratio: 0.7;
    height: auto;
    min-width: 18px;
    max-width: 26px;
    font-size: clamp(10px, 2.5vw, 14px);
}

.mobile-hand .stone-slot {
    width: 100%;
    aspect-ratio: 0.7;
    height: auto;
    min-width: 18px;
    max-width: 26px;
}

/* =====================================================
   MOBİL AKSİYON BAR
   ===================================================== */

.mobile-action-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.mobile-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 54px;
}

.mobile-action-btn i {
    flex-shrink: 0;
}

.mobile-action-btn span {
    line-height: 1;
}

.mobile-action-btn.primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.mobile-action-btn.primary:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
}

.mobile-action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-action-btn.secondary:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

.mobile-action-btn.accent {
    background: linear-gradient(135deg, var(--accent-purple) 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.mobile-action-btn.accent:active:not(:disabled) {
    transform: scale(0.95);
}

.mobile-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* =====================================================
   MOBİL LANDSCAPE MODU
   ===================================================== */

@media (max-width: 767px) and (orientation: landscape) {
    .mobile-top-bar {
        padding: 4px 8px;
    }

    .mobile-info-row {
        margin-bottom: 4px;
    }

    .mobile-players-row {
        display: none;
    }

    .mobile-middle-area {
        padding: 4px;
    }

    .mobile-hand {
        grid-template-columns: repeat(15, 1fr);
        padding: 6px;
    }

    .mobile-hand .stone {
        min-width: 20px;
        max-width: 28px;
    }

    .mobile-action-bar {
        padding: 6px 8px;
    }

    .mobile-action-btn {
        min-height: 44px;
        padding: 6px;
        flex-direction: row;
        gap: 6px;
    }

    .mobile-action-btn i {
        width: 16px;
        height: 16px;
    }
}

/* =====================================================
   EXTRA KÜÇÜK EKRANLAR (< 360px)
   ===================================================== */

@media (max-width: 359px) {
    .mobile-hand {
        grid-template-columns: repeat(15, 1fr);
        overflow-x: auto;
    }

    .mobile-hand .stone {
        min-width: 16px;
        max-width: 22px;
        font-size: 9px;
    }

    .mobile-hand .stone-slot {
        min-width: 16px;
        max-width: 22px;
    }

    .mobile-action-bar {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }

    .mobile-action-btn {
        font-size: 8px;
        padding: 6px 4px;
        min-height: 48px;
    }

    .mobile-side-discard,
    .mobile-discard-drop {
        width: 36px;
    }
}