/* ==========================================================================
   TERFIUI v5 — Birlikte Çöz / Duo (duo/index.php & duo_mode_waiting.php)
   ========================================================================== */

/* Sayfa Gövdesi — 8px Boşluklu Hizalama Kuralı */

/* ── 3 Ana Mod Seçim Kartları ── */
.gd-duo-modes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
    width: 100%;
}

@media (max-width: 992px) {
    .gd-duo-modes-grid {
        grid-template-columns: 1fr;
    }
}

.gd-duo-mode-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.gd-duo-mode-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.gd-duo-mode-card.active {
    border-color: #7c3aed;
    background: #faf5ff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12);
}

.gd-duo-mode-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gd-duo-mode-icon.purple { background: #f3e8ff; color: #7c3aed; }
.gd-duo-mode-icon.blue { background: #eff6ff; color: #2563eb; }
.gd-duo-mode-icon.emerald { background: #ecfdf5; color: #059669; }

.gd-duo-mode-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gd-duo-mode-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.gd-duo-mode-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* ── Misafir Tanıtım Kartı (Hero Banner - %50 - %50 Split Grid) ── */
.gd-duo-hero-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    border-radius: 16px;
    padding: 32px 28px;
    color: #ffffff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 28px;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.25);
    box-sizing: border-box;
}

.gd-duo-hero-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.gd-duo-hero-desc {
    font-size: 14px;
    opacity: 0.9;
    max-width: 100%;
    line-height: 1.6;
    margin: 0;
}

.gd-duo-features-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 991px) {
    .gd-duo-hero-banner {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 20px;
    }

    .gd-duo-features-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .gd-duo-features-grid {
        grid-template-columns: 1fr;
    }
}

.gd-duo-feature-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gd-duo-feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gd-duo-feature-title {
    font-size: 14px;
    font-weight: 800;
    margin: 0;
}

.gd-duo-feature-desc {
    font-size: 12px;
    opacity: 0.85;
    margin: 0;
    line-height: 1.4;
}

/* ── Nasıl Çalışır Adımları ── */
.gd-duo-steps-wrap {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.gd-duo-steps-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.gd-duo-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gd-duo-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 16px;
    transition: all 0.2s ease;
}

.gd-duo-step-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.gd-duo-step-num {
    width: 44px;
    height: 44px;
    background: #e0e7ff;
    color: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
}

.gd-duo-step-name {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.gd-duo-step-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ── Ana İşlem Izgarası (Oturum Oluştur / Oturuma Katıl) ── */
.gd-duo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: stretch;
}

.gd-duo-box {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    height: 100%;
}

/* ── 20-Second SVG Circular Timer ── */
.duo-timer-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.duo-timer-svg {
    transform: rotate(-90deg);
}

.duo-timer-bg {
    stroke: #e2e8f0;
}

.duo-timer-ring {
    stroke: #6366f1;
    stroke-dasharray: 163.36;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.duo-timer-ring.warning {
    stroke: #ef4444 !important;
}

.duo-timer-text {
    position: absolute;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
}

/* ── Kombo Efekti (Combo Badge) ── */
.duo-combo-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(238, 82, 83, 0.35);
    animation: comboPulse 0.6s infinite alternate;
}

@keyframes comboPulse {
    from { transform: scale(1); }
    to   { transform: scale(1.08); }
}

/* ── Hızlı Emoji & Tepki Butonları ── */
.duo-quick-emojis {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
}

.duo-emoji-btn {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
}

.duo-emoji-btn:hover {
    transform: scale(1.35) rotate(-6deg);
}

.duo-emoji-btn:active {
    transform: scale(0.9);
}

/* Uçan Emoji Animasyonu */
.duo-floating-emoji {
    position: fixed;
    bottom: 80px;
    font-size: 48px;
    pointer-events: none;
    z-index: 10000;
    animation: floatEmojiUp 1.8s ease-out forwards;
}

@keyframes floatEmojiUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.6) rotate(0deg);
    }
    40% {
        opacity: 1;
        transform: translateY(-120px) scale(1.3) rotate(-10deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-280px) scale(1.6) rotate(15deg);
    }
}

/* ── Liderlik Tablosu Kartı (Task 4.2) ── */
.duo-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.duo-lb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: transform 0.2s, border-color 0.2s;
}

.duo-lb-item:hover {
    transform: translateX(4px);
    border-color: #cbd5e1;
}

.duo-lb-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.duo-lb-rank {
    font-weight: 800;
    font-size: 1.1rem;
    min-width: 28px;
    text-align: center;
}

.duo-lb-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.duo-lb-right {
    font-weight: 700;
    font-size: 0.85rem;
    color: #ea580c;
    background: #fff7ed;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #ffedd5;
}

.duo-lb-wins {
    font-weight: 800;
}

.gd-duo-box form,
.gd-duo-limit-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gd-duo-box form > div:last-child,
.gd-duo-limit-actions {
    margin-top: auto !important;
    padding-top: 14px;
    display: flex;
    gap: 10px;
}

.gd-duo-box:hover {
    border-color: #c7d2fe;
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.12);
}

.gd-duo-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 14px;
}

.gd-duo-box-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gd-duo-box-header-icon.indigo {
    background: #e0e7ff;
    color: #4f46e5;
}

.gd-duo-box-header-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}

.gd-duo-box-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gd-duo-box-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.gd-duo-box-desc {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.gd-duo-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gd-duo-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gd-duo-select,
.gd-duo-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.gd-duo-select:focus,
.gd-duo-input:focus {
    outline: none;
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.gd-duo-cat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.gd-duo-cat-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.gd-duo-limit-box {
    padding: 12px;
    border-radius: 10px;
    background: #fff1f2;
    color: #be123c;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #ffe4e6;
}

.gd-duo-limit-box.unlimited {
    background: #ecfdf5;
    color: #047857;
    border-color: #d1fae5;
}

.gd-duo-info-notice {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.gd-duo-info-notice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #eff6ff;
    border-radius: 8px;
    color: #2563eb;
}

/* ── Uyarı Kutuları ── */
.gd-duo-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    border: 1.5px solid transparent;
}

.gd-duo-alert.danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.gd-duo-alert.info {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

/* ── Konu Seçici Modal Overlay ── */
.gd-duo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.gd-duo-cat-modal {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
    animation: duoModalSlideUp 0.22s ease-out;
}

@keyframes duoModalSlideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.gd-duo-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gd-duo-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.gd-duo-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
}

.gd-duo-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.gd-duo-modal-grid {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-duo-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.gd-duo-cat-item:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.gd-duo-cat-item.active {
    background: #6366f1;
    color: #ffffff;
    border-color: #4f46e5;
}

/* ── Oturum Bekleme Ekranı Stilleri (duo_mode_waiting.php) ── */
.gd-duo-split-60-40 {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 16px;
    align-items: start;
    width: 100%;
}

@media (max-width: 991px) {
    .gd-duo-split-60-40 {
        grid-template-columns: 1fr !important;
    }
}

.gd-duowait-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    text-align: center;
}

.gd-duowait-code-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 16px;
    font-family: monospace;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: all;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gd-duowait-code-box:hover {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4f46e5;
}

.gd-duowait-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: left;
}

.gd-duowait-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gd-duowait-info-label {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gd-duowait-info-val {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

/* Oyuncu Kartları Row */
.gd-duowait-players {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 10px 0;
}

.gd-duowait-vs-badge {
    font-size: 16px;
    font-weight: 800;
    color: #94a3b8;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gd-duowait-player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 140px;
}

.gd-duowait-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #64748b;
    transition: all 0.3s ease;
}

.gd-duowait-player-card.ready .gd-duowait-avatar {
    background: #dcfce7;
    border-color: #22c55e;
    color: #15803d;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.gd-duowait-player-card.waiting .gd-duowait-avatar {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #94a3b8;
}

.gd-duowait-player-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.gd-duowait-player-status {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
}

.gd-duowait-player-card.ready .gd-duowait-player-status {
    background: #dcfce7;
    color: #15803d;
}

/* Aksiyon Butonları */
.gd-duowait-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.gd-duowait-btn-block {
    width: 100%;
    justify-content: center;
}

.gd-duowait-btn-group {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.gd-duowait-btn-flex {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.gd-duowait-btn-cancel {
    justify-content: center;
    white-space: nowrap;
}

.gd-btn-disabled {
    opacity: 0.7;
    cursor: not-allowed !important;
}

/* Sağ Panel: Bilgilendirme ve Rehber Kartı */
.gd-duo-guide-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.gd-duo-guide-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gd-duo-guide-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gd-duo-guide-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.gd-duo-guide-num {
    width: 28px;
    height: 28px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

.gd-duo-guide-text-title {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 2px;
}

.gd-duo-guide-text-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.gd-duo-tips-box {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 14px;
    border-radius: 8px;
    font-size: 12px;
    color: #1e40af;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Geri Sayım Overlay */
.gd-duowait-countdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(79, 70, 229, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    color: #ffffff;
}

.gd-duowait-cd-circle {
    width: 130px;
    height: 130px;
    border: 6px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gd-duowait-cd-label {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    .gd-duo-features-grid {
        grid-template-columns: 1fr;
    }

    .gd-duo-steps-grid {
        grid-template-columns: 1fr;
    }

    .gd-duo-grid {
        grid-template-columns: 1fr;
    }

    .gd-duowait-card,
    .gd-duo-guide-card {
        padding: 20px 16px;
    }

    .gd-duowait-info-grid {
        grid-template-columns: 1fr 1fr;
        padding: 12px;
    }

    .gd-duowait-players {
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .gd-duowait-btn-group {
        flex-direction: column;
        gap: 8px;
    }

    .gd-duowait-btn-flex,
    .gd-duowait-btn-cancel {
        width: 100%;
        flex: none;
    }

    .gd-duowait-players {
        gap: 10px;
    }

    .gd-duowait-player-card {
        width: 110px;
    }

    .gd-duowait-code-box {
        font-size: 24px;
        letter-spacing: 4px;
        padding: 12px;
    }
}

/* ── Duo Mode Results Redesign (50-50 Split Layout Architecture) ── */

.gd-duores-banner {
    position: relative;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
    overflow: hidden;
}

.gd-duores-banner-victory {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.gd-duores-banner-draw {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.gd-duores-banner-loss {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
}

.gd-hero-title-line.gd-hero-title {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.gd-duores-banner-title {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}

.gd-duores-banner-sub {
    font-size: 14px;
    opacity: 0.95;
    margin: 0 0 14px 0;
}

.gd-duores-elo-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.gd-duores-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--gd-border-color, #e2e8f0);
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.gd-duores-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.gd-duores-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.gd-duores-player-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gd-duores-player-card {
    background: #ffffff;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gd-duores-player-card.winner {
    border-color: #10b981;
    background: #f0fdf4;
}

.gd-duores-player-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 6px;
    overflow: hidden;
}

.gd-duores-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gd-duores-player-name {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.gd-duores-score-box {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin: 4px 0 8px 0;
    white-space: nowrap;
}

.gd-duores-score-big {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.gd-duores-score-sub {
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
}

@media (max-width: 576px) {
    .gd-duores-player-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .gd-duores-player-card {
        padding: 12px 8px;
    }

    .gd-duores-score-big {
        font-size: 22px;
    }

    .gd-duores-score-sub {
        font-size: 11px;
    }

    .gd-duores-stat-item {
        font-size: 11px;
    }
}

/* ── Rule 26 Compliant Duo Gameplay Styles ── */

.gd-duoplay-wrapper {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gd-duoplay-header {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.gd-duoplay-scores {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
}

.gd-duoplay-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.gd-duoplay-name {
    font-weight: 700;
    color: #64748b;
    font-size: 13px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gd-duoplay-score {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.gd-duoplay-vs {
    font-weight: 900;
    color: #cbd5e1;
    font-size: 20px;
}

.gd-duoplay-progress-wrap {
    background: #f1f5f9;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.gd-duoplay-progress-bar {
    height: 100%;
    background: var(--gd-primary, #6366f1);
    width: 0%;
    transition: width 0.3s ease;
}

.gd-duoplay-progress-text {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* Rule 26: Inner Question Card (Compact 10px side padding & corner alignment) */
.gd-duoplay-card,
.duo-soru-karti {
    display: none;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 12px;
    animation: gdDuoplayFadeIn 0.25s ease-out;
}

@keyframes gdDuoplayFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gd-duoplay-question-title,
.soru-baslik {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    font-weight: 700;
    padding: 0 6px;
}

.gd-duoplay-question-text,
.soru-metin {
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 600;
    padding: 0 6px;
}

.gd-duoplay-options-list,
.secenek-listesi {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Rule 26: Inner Option Card (Compact 10px side padding: 14px 10px) */
.gd-duoplay-option,
.secenek {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    padding: 14px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    box-sizing: border-box;
}

.gd-duoplay-option:hover:not(.answered),
.secenek:hover:not(.answered) {
    border-color: #cbd5e1;
    background: #ffffff;
}

.gd-duoplay-option.user-selected,
.secenek.user-selected {
    border-color: #6366f1;
    background: #eef2ff;
}

.gd-duoplay-option.correct-answer,
.secenek.correct-answer {
    border-color: #22c55e !important;
    background: #dcfce7 !important;
    color: #166534 !important;
}

.gd-duoplay-option.wrong-answer,
.secenek.wrong-answer {
    border-color: #ef4444 !important;
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.gd-duoplay-option-letter,
.secenek-harf {
    font-weight: 800;
    opacity: 0.8;
}

/* Rule 26: Debug Console Box */
.gd-duoplay-debug-box {
    background: #0f172a;
    color: #38bdf8;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    padding: 12px 10px;
    border-radius: 10px;
    border: 1px solid #334155;
    line-height: 1.5;
    word-break: break-all;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    margin: 10px 0;
    overflow: hidden;
}

.gd-duoplay-debug-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 6px;
    margin-bottom: 6px;
}

.gd-duoplay-debug-clear-btn {
    background: #334155;
    color: #ffffff;
    border: none;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

/* ── 70-30 Split Grid Layout for Gameplay (duo_mode_play.php) ── */

.gd-duo-split-70-30 {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 14px;
    align-items: start;
    width: 100%;
}

@media (max-width: 991px) {
    .gd-duo-split-70-30 {
        grid-template-columns: 1fr !important;
    }
}

/* Rule 26: Compact 10px Side Spacing Chat Card */
.gd-duoplay-chat-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 80px;
    overflow: hidden;
    transition: padding 0.2s ease, gap 0.2s ease, box-shadow 0.2s ease;
    will-change: padding, height;
}

.gd-duoplay-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, padding 0.2s ease;
}

.gd-duoplay-chat-header h3 {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.gd-duoplay-chat-toggle-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

/* Accordion Collapsed States (Zero Flicker Architecture) */
.gd-duoplay-chat-card.collapsed {
    gap: 0 !important;
    padding: 12px 10px !important;
}

.gd-duoplay-chat-card.collapsed .chat-messages,
.gd-duoplay-chat-card.collapsed .chat-quick-messages,
.gd-duoplay-chat-card.collapsed .chat-input-area,
.gd-duoplay-chat-card.collapsed .gd-duoplay-bot-info-body {
    display: none !important;
}

.gd-duoplay-chat-card.collapsed .gd-duoplay-chat-header {
    border-bottom-color: transparent !important;
    padding-bottom: 0 !important;
}

.gd-duoplay-chat-card.collapsed .gd-duoplay-chat-toggle-icon {
    transform: rotate(-90deg);
}

/* Mobile SSS Accordion Behavior (<= 991px) */
@media (max-width: 991px) {
    .gd-duoplay-chat-card:not(.is-user-expanded) {
        gap: 0 !important;
        padding: 12px 10px !important;
    }

    .gd-duoplay-chat-card:not(.is-user-expanded) .chat-messages,
    .gd-duoplay-chat-card:not(.is-user-expanded) .chat-quick-messages,
    .gd-duoplay-chat-card:not(.is-user-expanded) .chat-input-area,
    .gd-duoplay-chat-card:not(.is-user-expanded) .gd-duoplay-bot-info-body {
        display: none !important;
    }

    .gd-duoplay-chat-card:not(.is-user-expanded) .gd-duoplay-chat-header {
        border-bottom-color: transparent !important;
        padding-bottom: 0 !important;
    }

    .gd-duoplay-chat-card:not(.is-user-expanded) .gd-duoplay-chat-toggle-icon {
        transform: rotate(-90deg);
    }

    .gd-duoplay-chat-card.is-user-expanded {
        gap: 12px !important;
        padding: 14px 10px !important;
    }

    .gd-duoplay-chat-card.is-user-expanded .gd-duoplay-chat-header {
        border-bottom: 1px solid #f1f5f9 !important;
        padding-bottom: 10px !important;
    }

    .gd-duoplay-chat-card.is-user-expanded .gd-duoplay-chat-toggle-icon {
        transform: rotate(0deg);
    }
}

.gd-duoplay-bot-info-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.gd-duoplay-bot-badge {
    background: #e0e7ff;
    color: #4338ca;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
}

.gd-duoplay-tips-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-duoplay-tip-item {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #334155;
}

/* ── Live Chat Box & Input Elements (Rule 26 Compliant) ── */
.chat-messages {
    height: 260px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
}

.chat-message {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
}

.chat-message.me {
    align-self: flex-end;
    background: var(--gd-primary, #6366f1);
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.chat-message.other {
    align-self: flex-start;
    background: #e2e8f0;
    color: #1e293b;
    border-bottom-left-radius: 2px;
}

.chat-quick-messages {
    padding: 4px 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.chat-quick-messages::-webkit-scrollbar {
    display: none;
}

.quick-msg {
    background: #f1f5f9;
    color: #475569;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
    user-select: none;
}

.quick-msg:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.chat-input-area {
    display: flex;
    gap: 6px;
    align-items: center;
    padding-top: 4px;
}

.chat-input {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    outline: none;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.chat-input:focus {
    border-color: var(--gd-primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.chat-send-btn {
    background: var(--gd-primary, #6366f1);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #4f46e5;
    transform: scale(1.05);
}


.gd-duores-stats-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.gd-duores-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.gd-duores-stat-val-correct {
    color: #166534;
    font-weight: 800;
}

.gd-duores-stat-val-wrong {
    color: #991b1b;
    font-weight: 800;
}

.gd-duores-decisive-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-duores-decisive-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
}

.gd-duores-decisive-link {
    color: #4f46e5;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gd-duores-decisive-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gd-duores-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gd-duores-badge-correct {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.gd-duores-badge-wrong {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.gd-duores-lb-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gd-duores-lb-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.gd-duores-lb-rank {
    font-size: 14px;
    font-weight: 800;
    width: 24px;
    display: inline-block;
}

.gd-duores-lb-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.gd-duores-lb-wins {
    font-size: 12px;
    font-weight: 800;
    color: #e11d48;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gd-duores-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
    flex-wrap: wrap;
}

.gd-duores-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gd-primary, #6366f1);
    color: #ffffff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.gd-duores-btn-primary:hover {
    background: #4f46e5;
    color: #ffffff;
    transform: translateY(-1px);
}

.gd-duores-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gd-duores-btn-secondary:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #94a3b8;
}

@media (max-width: 576px) {
    .gd-duores-player-grid {
        grid-template-columns: 1fr;
    }
}

