/* ==========================================================================
   1. GLOBAL RESETS & VARS
   ========================================================================== */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f9fafb;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* ==========================================================================
   2. NAVBAR & NAVIGATION
   ========================================================================== */
.navbar {
    background-color: #ffffff !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #f3f4f6;
    padding: 0.8rem 1rem;
}

.navbar-brand {
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ==========================================================================
   3. CARD & GLASSMORPHISM
   ========================================================================== */
.card {
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    border-radius: 1.25rem !important;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

/* ==========================================================================
   4. PROFILE & SWIPE CARDS (Keşfet & Profil)
   ========================================================================== */
.profile-img-container {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-card-img {
    height: 380px;
    width: 100%;
    object-fit: cover;
}

/* ==========================================================================
   5. BUTTONS & FORMS
   ========================================================================== */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-rounded {
    border-radius: 50rem !important;
}

.form-control, .form-select {
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px var(--primary-light) !important;
}

/* Badges */
.badge-soft-primary {
    background-color: var(--primary-light);
    color: var(--primary-color);
}


/* ==========================================
   Keşfet / Match Modülü Özel Stilleri
   ========================================== */

/* Konteyner & Deste Alanı */
.discover-container {
    min-height: calc(100vh - 80px);
    padding: 2rem 1rem;
}

.discover-card-deck {
    width: 380px;
    height: 580px;
    max-width: 90vw;
    max-height: 75vh;
}

/* Sürüklenebilir Kart */
.discover-swipe-card {
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    will-change: transform, opacity;
}

.discover-swipe-card:active {
    cursor: grabbing;
}

/* Görsel & Overlay */
.discover-card-img-wrapper {
    overflow: hidden;
    background-color: #212529;
}

.discover-card-img-wrapper img.blur-image {
    filter: blur(18px) brightness(0.9);
    transform: scale(1.08); /* Blur kenarlarında oluşan beyaz taşmaları gizlemek için hafif büyütme */
    transition: filter 0.5s ease, transform 0.5s ease;
}

/* Eşleşme veya Netleştirme Durumu İçin (Opsiyonel) */
.discover-card-img-wrapper img.unblur-image {
    filter: blur(0px) brightness(1);
    transform: scale(1);
}
.discover-card-info-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.9) 100%);
    backdrop-filter: blur(2px);
}

.discover-card-bio {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Damga (Stamp) Efektleri */
.discover-stamp {
    font-size: 1.6rem;
    letter-spacing: 2px;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.discover-stamp-like {
    transform: rotate(-15deg);
}

.discover-stamp-pass {
    transform: rotate(15deg);
}

/* Uyum Yüzdesi Rozeti */
.discover-match-badge {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.3);
}

/* Alt Etkileşim Butonları */
.discover-action-buttons {
    z-index: 10;
}

.discover-btn-action {
    width: 64px;
    height: 64px;
    border-width: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.discover-btn-action:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.discover-btn-action:active {
    transform: scale(0.95);
}

/* Boş Deste Ekranı */
.discover-empty-deck {
    border: 2px dashed #dee2e6;
}

/* Match Card Styles & Animations */
.match-card-fade-out {
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.3s ease-out;
}

.object-fit-cover {
    object-fit: cover;
}

/* BlindConnect Gizli Profil / Blur CSS */
.blurred-profile-photo {
    filter: blur(18px);
    transform: scale(1.1); /* Blur kenarlarındaki boşlukları kapatır */
    transition: filter 0.4s ease, transform 0.4s ease;
    user-select: none;
    pointer-events: none;
}

.revealed-profile-photo {
    filter: blur(0px);
    transform: scale(1);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.blur-overlay-badge {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Action Buttons */
.btn-action {
    width: 60px;
    height: 60px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-action:hover:not(:disabled) {
    transform: scale(1.1);
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}



/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Mobil ve Tablet Ekranları (< 768px) */
@media (max-width: 767.98px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .discover-card-img {
        height: 300px; /* Mobilde kart resmini biraz kısaltalım */
    }

    .profile-img-container {
        width: 100px;
        height: 100px;
    }

    .display-4 {
        font-size: 2.25rem;
    }

    .card-body {
        padding: 1.25rem !important;
    }

    /* Mobilde alt navigasyonu/buton grubunu dikeyleştirip rahatlatma */
    .mobile-stack-btn {
        flex-direction: column;
        width: 100%;
    }
}

/* Çok Küçük Ekranlar (< 480px) */
@media (max-width: 479.98px) {
    .discover-card-img {
        height: 260px;
    }

    .btn-lg {
        padding: 0.6rem 1.2rem !important;
        font-size: 1rem !important;
    }
}

/* ==========================================================================
   7. MOBILE OVERFLOW & SAFE AREA FIXES (Eklenen Güvenlik Kuralı)
   ========================================================================== */
@media (max-width: 480px) {
    .discover-card-deck {
        width: 100% !important;
        height: 520px !important;
    }
}

/* Sayfa genelinde yatay kayma direnci */
html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}