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

/* Sayfa Gövdesi — 8px Boşluklu Hizalama Kuralı */
/* ── Misafir Tanıtım Kartı (Hero Banner) ── */
.gd-duo-hero-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    border-radius: 16px;
    padding: 32px 24px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 20px;
    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;
    line-height: 1.3;
}

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

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

.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: 8px;
}

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

.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;
}

.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;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

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

/* 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;
    }
}
