/* ==========================================================================
   MÜBAREZE - OSMANLI-TÜRK TAKTİK KART SAVAŞI (PC + MOBİL OPTİMİZE TASARIM)
   ========================================================================== */

/* Mübareze sayfasında tam genişlikli savaş alanı; Liderlik tablosu alta iner ki tahta daralmasın */
.mubareze-play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    max-width: 100%;
    overflow-x: hidden;
}

.mub-root {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    user-select: none;
    max-width: 100%;
    overflow-x: hidden;
}

/* ==========================================================================
   1. OYUN ÖNCESİ KURULUM & ARKADAŞ DAVET / ONAY LOBİSİ EKRANI
   ========================================================================== */
.mub-setup-screen {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding: 1.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-border);
    background: linear-gradient(160deg, rgba(16, 26, 40, 0.94) 0%, var(--bg-surface) 100%);
}

[data-theme="light"] .mub-setup-screen {
    background: var(--bg-surface);
}

.mub-setup-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.85rem;
    border-bottom: 1px solid rgba(197, 160, 89, 0.25);
    padding-bottom: 0.9rem;
}

.mub-setup-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin: 0 0 0.2rem;
}

.mub-setup-sub {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
}

.mub-setup-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.mub-scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.mub-scenario-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gold-border);
    background: var(--bg-card);
    transition: var(--transition-smooth);
}

.mub-scenario-card:hover {
    border-color: var(--gold-bright);
    box-shadow: 0 0 14px var(--gold-glow);
}

@media (max-width: 1024px) {
    .mub-scenario-grid {
        grid-template-columns: 1fr;
    }
}

.mub-setup-tab {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gold-border);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.mub-setup-tab:hover {
    border-color: var(--gold-bright);
}

.mub-setup-tab.active {
    border-color: var(--gold-bright);
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.24) 0%, rgba(197, 160, 89, 0.08) 100%);
    color: var(--gold-bright);
    box-shadow: 0 0 16px var(--gold-glow);
}

.mub-setup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.mub-setup-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(197, 160, 89, 0.28);
    background: var(--bg-card);
}

.mub-setup-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gold-bright);
    font-weight: 700;
}

.mub-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mub-choice-pill {
    padding: 0.45rem 0.78rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-border);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mub-choice-pill.active {
    border-color: var(--gold-bright);
    background: rgba(197, 160, 89, 0.24);
    color: var(--gold-bright);
}

.mub-setup-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* PvP Bekleme Ekranı (Rakip Onayı Bekleniyor...) */
.mub-pvp-waiting-card {
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gold-bright);
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.14) 0%, rgba(14, 24, 38, 0.82) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.7rem;
}

.mub-invite-code-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1.5px dashed var(--gold-bright);
    background: rgba(6, 10, 18, 0.8);
    font-family: monospace;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold-bright);
}

.mub-waiting-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--emerald-bright);
    animation: mubPulseWait 1.5s ease-in-out infinite;
}

@keyframes mubPulseWait {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

.mub-pvp-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.mub-pvp-box {
    padding: 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(197, 160, 89, 0.3);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mub-pvp-challenge-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.mub-pvp-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mub-pvp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid rgba(197, 160, 89, 0.28);
}

.mub-pvp-row.is-my-turn {
    border-color: var(--emerald-bright);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.22);
}

/* ==========================================================================
   2. SAVAŞ ALANI ÜST BAR & COĞRAFYA ŞERİDİ (KOMPAKT)
   ========================================================================== */
.mub-geo-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.42rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-border);
    background: linear-gradient(90deg, rgba(197, 160, 89, 0.14) 0%, var(--bg-surface) 100%);
    font-size: 0.84rem;
}

.mub-geo-name {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.mub-geo-desc {
    color: var(--text-main);
    font-size: 0.82rem;
    opacity: 0.9;
}

.mub-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.52rem 0.85rem;
    background: var(--bg-surface);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-sm);
}

.mub-turn-banner {
    font-family: var(--font-serif);
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.3px;
}

.mub-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 30 Saniyelik Canlı Sıra Sayacı */
.mub-turn-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.72rem;
    border-radius: 20px;
    border: 1.5px solid var(--gold-primary);
    background: rgba(197, 160, 89, 0.16);
    color: var(--gold-bright);
    font-weight: 700;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.mub-turn-timer.is-urgent {
    border-color: var(--danger-rose);
    background: rgba(255, 90, 95, 0.24);
    color: #ff9c9f;
    animation: mubUrgentPulse 0.8s ease-in-out infinite;
}

.mub-turn-timer.is-stopped {
    opacity: 0.6;
    animation: none;
}

@keyframes mubUrgentPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 90, 95, 0.35); }
    50% { box-shadow: 0 0 18px rgba(255, 90, 95, 0.85); }
}

.mub-nizam-btn {
    padding: 0.38rem 0.85rem;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gold-bright);
    background: rgba(197, 160, 89, 0.16);
    color: var(--gold-bright);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mub-nizam-btn:hover:not(:disabled) {
    background: rgba(197, 160, 89, 0.3);
    box-shadow: 0 0 12px var(--gold-glow);
}

.mub-nizam-btn.is-active {
    background: linear-gradient(135deg, #163E33 0%, #0E2922 100%);
    border-color: var(--emerald-bright);
    color: #6BFFAA;
    box-shadow: 0 0 14px rgba(46, 204, 113, 0.45);
}

.mub-nizam-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

/* Mobil Kompakt Özet Şeridi (PC'de gizli, mobilde görünür) */
.mub-mobile-hud {
    display: none;
}

/* ==========================================================================
   3. ANA SAVAŞ ALANI: SOL KOMUTA & İNCELEME PANELİ + SAĞ 6 KOMPAKT ŞERİT
   ========================================================================== */
.mub-arena {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: stretch;
    max-width: 100%;
}

.mub-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.55rem;
    min-width: 0;
}

.mub-commander-box {
    background: var(--bg-surface);
    border: 1.5px solid var(--gold-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.8rem;
}

.mub-commander-box.is-active-turn {
    border-color: var(--gold-bright);
    box-shadow: 0 0 14px var(--gold-glow);
}

.mub-cmd-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.mub-cmd-name {
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mub-total-power {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--gold-bright);
    line-height: 1;
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-border);
    background: rgba(197, 160, 89, 0.14);
}

.mub-gems {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.mub-gem {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-bright);
    background: radial-gradient(circle at 35% 35%, #ff6b6b, #a81c24);
    box-shadow: 0 0 8px rgba(255, 90, 95, 0.6);
}

.mub-gem.is-player {
    background: radial-gradient(circle at 35% 35%, #4ef095, #146c43);
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

.mub-gem.is-lost {
    background: rgba(100, 116, 139, 0.25);
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: none;
    opacity: 0.45;
}

.mub-cmd-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-main);
    opacity: 0.88;
}

.mub-pass-tag {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.14rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-radius: 3px;
    background: rgba(255, 90, 95, 0.2);
    border: 1px solid var(--danger-rose);
    color: var(--danger-rose);
}

/* İklim Kutusu */
.mub-weather-box {
    background: var(--bg-surface);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
}

.mub-weather-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--gold-bright);
    margin-bottom: 0.32rem;
    font-weight: 700;
}

.mub-weather-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-height: 22px;
    align-items: center;
}

.mub-weather-pill {
    font-size: 0.78rem;
    padding: 0.16rem 0.48rem;
    border-radius: 3px;
    border: 1px solid var(--gold-border);
    background: rgba(197, 160, 89, 0.14);
    color: var(--text-white);
}

/* Büyük & Okunaklı Kart İnceleme (Inspector) Kutusu */
.mub-inspector {
    background: var(--bg-surface);
    border: 1.5px solid var(--gold-border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.8rem;
    min-height: 98px;
}

.mub-inspector-name {
    font-family: var(--font-serif);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 0.25rem;
}

.mub-inspector-desc {
    font-size: 0.86rem;
    color: var(--text-main);
    line-height: 1.45;
}

/* Kompakt Savaş Günlüğü */
.mub-log-box {
    background: var(--bg-surface);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.7rem;
    max-height: 92px;
    overflow-y: auto;
    font-size: 0.78rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mub-log-line {
    padding-bottom: 0.18rem;
    border-bottom: 1px solid rgba(197, 160, 89, 0.12);
    color: var(--text-main);
}

/* ==========================================================================
   4. SAĞ 6 SAVAŞ ŞERİDİ (TEK EKRANA SIĞAN KOMPAKT YÜKSEKLİK)
   ========================================================================== */
.mub-board {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    padding: 0.58rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gold-primary);
    background-image:
        linear-gradient(180deg, rgba(6, 10, 17, 0.42) 0%, rgba(6, 10, 17, 0.58) 100%),
        url('/images/games/mubareze/battlefield-bg.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.72), 0 8px 22px rgba(0, 0, 0, 0.42);
    min-width: 0;
}

.mub-divider {
    height: 2px;
    margin: 0.18rem 0;
    background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
    box-shadow: 0 0 10px var(--gold-glow);
}

.mub-row {
    display: grid;
    grid-template-columns: 42px 42px minmax(0, 1fr);
    gap: 0.48rem;
    align-items: center;
    min-height: 96px;
    padding: 0.32rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(212, 175, 95, 0.36);
    background: rgba(8, 13, 22, 0.58);
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mub-row.has-weather-melee {
    box-shadow: inset 0 0 26px rgba(56, 189, 248, 0.3);
    border-color: rgba(56, 189, 248, 0.7);
}

.mub-row.has-weather-ranged {
    box-shadow: inset 0 0 26px rgba(203, 213, 225, 0.26);
    border-color: rgba(203, 213, 225, 0.65);
}

.mub-row.has-weather-siege {
    box-shadow: inset 0 0 26px rgba(99, 102, 241, 0.3);
    border-color: rgba(129, 140, 248, 0.7);
}

.mub-row.is-horn-target {
    cursor: pointer;
    border-color: var(--gold-bright);
    box-shadow: 0 0 18px rgba(247, 214, 136, 0.5);
    animation: mubPulseGold 1.2s ease-in-out infinite;
}

@keyframes mubPulseGold {
    0%, 100% { box-shadow: 0 0 10px rgba(247, 214, 136, 0.3); }
    50% { box-shadow: 0 0 22px rgba(247, 214, 136, 0.75); }
}

.mub-row-score {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-border);
    background: var(--bg-surface);
    color: var(--text-white);
    font-family: var(--font-serif);
    font-size: 1.22rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mub-horn-slot {
    width: 40px;
    height: 58px;
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(197, 160, 89, 0.4);
    background: rgba(197, 160, 89, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

.mub-horn-slot.is-active {
    border: 1.5px solid var(--gold-bright);
    background: rgba(197, 160, 89, 0.24);
    color: var(--gold-bright);
    font-weight: 700;
    box-shadow: 0 0 12px var(--gold-glow);
}

.mub-row-cards {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.1rem 0;
    min-height: 88px;
    scrollbar-width: thin;
}

.mub-row-label-bg {
    position: absolute;
    right: 0.65rem;
    top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #E2D5B5;
    opacity: 0.65;
    pointer-events: none;
}

/* ==========================================================================
   5. KART TASARIMI (KOMPAKT BOYUT + YÜKSEK KONTRAST & OKUNAKLI STAT ŞERİDİ)
   ========================================================================== */
.mub-card {
    width: 82px;
    height: 112px;
    flex-shrink: 0;
    border-radius: 5px;
    border: 1.5px solid var(--gold-primary);
    background: #070B12;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
}

.mub-card.is-hero {
    border: 2px solid #F7D688;
    box-shadow: 0 0 12px rgba(247, 214, 136, 0.42), 0 4px 10px rgba(0, 0, 0, 0.6);
}

.mub-card.is-hand-card {
    width: 102px;
    height: 142px;
    cursor: pointer;
}

.mub-card.is-hand-card:hover,
.mub-card.is-selected {
    transform: translateY(-8px) scale(1.04);
    border-color: #F7D688;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.68), 0 0 16px rgba(247, 214, 136, 0.55);
    z-index: 10;
}

.mub-card.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mub-card.is-disabled:hover {
    transform: none;
}

.mub-card-art {
    position: relative;
    width: 100%;
    height: 58%;
    overflow: hidden;
    background: radial-gradient(circle at center, #18263A 0%, #09101B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mub-card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}

.mub-card-art::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24%;
    background: linear-gradient(180deg, transparent 0%, rgba(7, 11, 18, 0.92) 100%);
    pointer-events: none;
}

.mub-card-fallback {
    font-size: 1.6rem;
    color: var(--gold-primary);
    opacity: 0.75;
}

.mub-card-footer {
    height: 42%;
    padding: 0.2rem 0.28rem;
    border-top: 1px solid rgba(212, 175, 95, 0.7);
    background: linear-gradient(180deg, rgba(13, 21, 34, 0.98) 0%, #06090F 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mub-card-name {
    font-family: var(--font-serif);
    font-size: 0.74rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.08;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mub-card.is-hand-card .mub-card-name {
    font-size: 0.82rem;
}

.mub-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
}

.mub-power-pill {
    min-width: 24px;
    height: 20px;
    padding: 0 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(212, 175, 95, 0.65);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mub-power-pill.is-hero {
    background: linear-gradient(135deg, #D4AF37 0%, #9E7B23 100%);
    color: #080D14;
    border-color: #FFF0B3;
}

.mub-power-pill.is-buffed {
    background: rgba(46, 204, 113, 0.28);
    border-color: #2ECC71;
    color: #7BFFB5;
}

.mub-power-pill.is-debuffed {
    background: rgba(255, 90, 95, 0.28);
    border-color: #FF5A5F;
    color: #FFA6AA;
}

.mub-card-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.74rem;
    color: #F7D688;
}

.mub-card-submeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 600;
    color: #CBD5E1;
    line-height: 1;
}

.mub-cd-pill {
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(255, 90, 95, 0.24);
    border: 1px solid rgba(255, 90, 95, 0.6);
    color: #FFA6AA;
    font-weight: 700;
}

.mub-cd-pill.is-ready {
    background: rgba(46, 204, 113, 0.28);
    border-color: #2ECC71;
    color: #7BFFB5;
}

.mub-card.is-cannon-ready {
    cursor: pointer;
    border-color: #2ECC71;
    box-shadow: 0 0 14px rgba(46, 204, 113, 0.6);
}

/* ==========================================================================
   6. OYUNCU ELİ (HAND DOCK) & MOBİL TEK DOKUNUŞ ÖNİZLEME ÇUBUĞU
   ========================================================================== */
.mub-hand-panel {
    background: var(--bg-surface);
    border: 1.5px solid var(--gold-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
}

.mub-hand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    color: var(--gold-bright);
    font-weight: 700;
}

.mub-hand-cards {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.55rem 0.2rem 0.25rem;
    min-height: 152px;
    align-items: center;
    -webkit-overflow-scrolling: touch;
}

/* Mobil Seçili Kart Önizleme & Oyna Çubuğu */
.mub-mobile-preview {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gold-bright);
    background: rgba(14, 24, 38, 0.96);
}

.mub-mobile-preview.show {
    display: flex;
}

.mub-mobile-preview-info {
    min-width: 0;
    flex: 1;
}

.mub-mobile-preview-title {
    font-family: var(--font-serif);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.mub-mobile-preview-desc {
    font-size: 0.78rem;
    color: #E2E8F0;
    line-height: 1.3;
}

.mub-mobile-thumbbar {
    display: none;
}

/* Mulligan & Hekim Seçim Overlay Modalı */
.mub-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 9, 15, 0.88);
    backdrop-filter: blur(6px);
    z-index: 2600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mub-overlay.show {
    display: flex;
}

.mub-overlay-box {
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    text-align: center;
}

.mub-modal-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin: 1rem 0 1.25rem;
}

.mub-round-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2700;
    padding: 1rem 2rem;
    background: rgba(8, 13, 20, 0.96);
    border: 2px solid var(--gold-bright);
    border-radius: var(--radius-sm);
    color: var(--gold-bright);
    font-family: var(--font-serif);
    font-size: 1.55rem;
    font-weight: 700;
    box-shadow: 0 0 36px rgba(247, 214, 136, 0.45);
    display: none;
    text-align: center;
    max-width: 92vw;
}

.mub-round-toast.show {
    display: block;
}

/* ==========================================================================
   7. TABLET & MOBİL CİHAZ OPTİMİZASYONU (SIFIR YATAY TAŞMA + DOKUNMATİK DOCK)
   ========================================================================== */
@media (max-width: 1024px) {
    .mub-setup-grid {
        grid-template-columns: 1fr;
    }
    .mub-pvp-two-col {
        grid-template-columns: 1fr;
    }
    .mub-arena {
        grid-template-columns: 1fr;
    }
    .mub-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .oyunhane-container,
    .sudoku-stage-card {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
        overflow-x: hidden;
    }

    .mub-setup-screen {
        padding: 0.9rem;
    }

    .mub-setup-tabs {
        grid-template-columns: 1fr;
    }

    /* Mobilde sol sidebar yerine kompakt üst HUD şeridi kullanılır */
    .mub-sidebar {
        display: none;
    }

    .mub-mobile-hud {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 0.45rem;
        padding: 0.5rem 0.65rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--gold-border);
        background: var(--bg-surface);
        font-size: 0.82rem;
    }

    .mub-mobile-hud-side {
        display: flex;
        flex-direction: column;
        gap: 0.18rem;
        min-width: 0;
    }

    .mub-mobile-hud-side.is-right {
        align-items: flex-end;
        text-align: right;
    }

    .mub-mobile-hud-score {
        font-family: var(--font-serif);
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--gold-bright);
        line-height: 1;
    }

    .mub-topbar {
        padding: 0.45rem 0.6rem;
    }

    .mub-turn-banner {
        font-size: 0.98rem;
    }

    .mub-geo-banner {
        padding: 0.38rem 0.6rem;
        font-size: 0.78rem;
    }

    .mub-geo-desc {
        display: none;
    }

    /* Kompakt 6 Şerit (Mobilde minimum kaydırma) */
    .mub-board {
        padding: 0.4rem;
        gap: 0.28rem;
    }

    .mub-row {
        grid-template-columns: 32px 30px minmax(0, 1fr);
        gap: 0.32rem;
        min-height: 74px;
        padding: 0.24rem 0.35rem;
    }

    .mub-row-score {
        width: 30px;
        height: 30px;
        font-size: 0.98rem;
    }

    .mub-horn-slot {
        width: 28px;
        height: 44px;
        font-size: 0.68rem;
    }

    .mub-row-cards {
        min-height: 68px;
        gap: 0.3rem;
    }

    .mub-row-label-bg {
        font-size: 0.6rem;
        right: 0.35rem;
        top: 0.15rem;
    }

    .mub-card {
        width: 68px;
        height: 92px;
    }

    .mub-card.is-hand-card {
        width: 86px;
        height: 120px;
    }

    .mub-card-name {
        font-size: 0.66rem;
    }

    .mub-card.is-hand-card .mub-card-name {
        font-size: 0.74rem;
    }

    .mub-power-pill {
        min-width: 20px;
        height: 17px;
        font-size: 0.72rem;
    }

    /* Altta başparmak dostu El Destesi & Aksiyon Barı */
    .mub-hand-panel {
        position: sticky;
        bottom: 0;
        z-index: 40;
        padding: 0.5rem 0.6rem;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.65);
    }

    .mub-hand-cards {
        min-height: 128px;
        padding: 0.35rem 0.1rem 0.2rem;
    }

    .mub-mobile-thumbbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-top: 0.45rem;
    }

    .mub-mobile-thumbbar button {
        width: 100%;
        padding: 0.55rem 0.75rem !important;
        font-size: 0.88rem !important;
    }

    /* Üst bardaki Nizam ve Pas butonları mobilde alttaki thumbbar'da yer alır */
    .mub-topbar-actions .mub-nizam-btn,
    .mub-topbar-actions .mub-pass-desktop {
        display: none;
    }
}
