:root {
    --primary-bg: #0f172a;
    --sidebar-bg: #1e293b;
    --card-bg: #1e293b;
    --accent-color: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bs-secondary-color: #6c757d;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg) !important;
    background-color: #0f172a; /* Fallback */
    color: var(--text-main) !important;
    color: #f8fafc; /* Fallback */
    overflow-x: hidden;
    /* Sticky Footer Setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* --- PUBLIC LAYOUT STYLES (Masaüstü ve Mobil) --- */

/* Navbar: Masaüstü bozulmasını engellemek için position:fixed kaldırıldı. 
   Bootstrap 'fixed-top' sınıfı zaten bunu hallediyor. */
.navbar {
    background-color: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 1px;
    color: white !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-muted) !important;
    color: #94a3b8 !important; /* Fallback */
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 0 10px;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color) !important;
    color: #3b82f6 !important; /* Fallback */
}

.btn-login {
    background-color: var(--accent-color);
    background-color: #3b82f6; /* Fallback */
    color: white;
    border-radius: 50px;
    padding: 8px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none; /* Kenarlık kaldırıldı */
    display: inline-flex; /* İkon ve yazı hizalaması için */
    align-items: center;
}

.btn-login:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: white;
}

footer {
    background-color: #0b1120;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
    padding: 3rem 0;
    color: var(--text-muted);
    color: #94a3b8; /* Fallback */
    position: relative;
    z-index: 10;
}

.footer-link {
    color: var(--text-muted);
    color: #94a3b8; /* Fallback */
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: white;
    text-decoration: none;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
    margin-right: 10px;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--accent-color);
    background: #3b82f6; /* Fallback */
    color: white;
    transform: translateY(-3px);
}

/* --- USER PANEL STYLES --- */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--sidebar-bg);
    background: #1e293b; /* Fallback */
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
}

.brand-box {
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    list-style: none;
    padding: 0 1rem;
    margin-top: 1rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--text-muted);
    color: #94a3b8; /* Fallback */
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.nav-item a:hover, .nav-item a.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    color: #3b82f6; /* Fallback */
}

.nav-item a i { width: 25px; font-size: 1.1rem; }

.main-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.lang-btn {
    border: 1px solid rgba(255,255,255,0.2);
    color: #ccc;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s;
    background: rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.dropdown-menu-dark {
    background-color: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
}

.dropdown-item:hover {
    background-color: var(--accent-color);
    background-color: #3b82f6; /* Fallback */
    color: white;
}

/* --- MODERN HERO SLIDER --- */
.hero-section {
    position: relative;
    padding: 20px 0;
}

.modern-slider {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    height: 500px; 
}

.carousel-item {
    height: 500px;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7); 
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 2rem;
    bottom: 20%;
}

/* --- DETAY KARTLARI (GLASSMORPHISM) --- */
.feature-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--bs-primary);
    border-color: #3b82f6; /* Fallback */
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--bs-primary);
    background: #3b82f6; /* Fallback */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 1.5rem;
}

/* --- YÜZEN TELEGRAM BUTONU --- */
.floating-telegram {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #0088cc; 
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 136, 204, 0.4);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.floating-telegram:hover {
    transform: scale(1.1) rotate(10deg);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 136, 204, 0.6);
}

.floating-telegram i, .floating-telegram svg {
    font-size: 30px;
    fill: white;
}

.floating-telegram::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #0088cc;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* --- FOOTER LİNKLERİ --- */
.footer-legal-links a {
    color: #6c757d;
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-legal-links a:hover {
    color: var(--bs-primary);
}

/* --- MODERN LOGO TASARIMI --- */
.navbar-brand-logo {
    height: 55px; 
    width: auto;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); 
}

.navbar-brand:hover .navbar-brand-logo {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.2)); 
}

@media (max-width: 576px) {
    .navbar-brand-logo {
        height: 45px;
    }
}

/* --- DARK MODE ZORLAMALARI (Components) --- */
.card {
    background-color: #1e293b; 
    border: 1px solid rgba(255,255,255,0.05);
    color: #fff;
}

.card-header {
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.card-footer {
    background-color: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.form-control, .form-select {
    background-color: #0f172a;
    border: 1px solid #334155;
    color: #fff;
}

.form-control:focus, .form-select:focus {
    background-color: #0f172a;
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

::placeholder {
    color: #64748b !important;
}

/* =============================================
   MOBILE-ONLY NAVIGATION & UI (max-width: 768px)
   ============================================= */

@media (max-width: 768px) {
    body {
        padding-bottom: 85px !important;
    }
    
    /* Kullanıcı Paneli Sidebar Gizleme */
    .sidebar { 
        display: none !important; 
    }
    
    .main-content { 
        margin-left: 0; 
        padding: 1rem; 
        padding-bottom: 100px; 
    }
    
    .topbar { 
        margin-bottom: 1.5rem; 
    }

    /* Navbar GİZLEME kodu KALDIRILDI. Artık Navbar mobilde görünür olacak. */

    /* ALT SABİT MENÜ (BOTTOM NAVIGATION) */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: rgba(30, 41, 59, 0.95); 
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 1050;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav-item {
        text-decoration: none !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #94a3b8; 
        font-size: 11px;
        transition: all 0.2s ease;
        flex: 1;
    }

    .mobile-nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .mobile-nav-item.active {
        color: #3b82f6; 
    }

    .mobile-nav-item.ai-center {
        position: relative;
        top: -15px;
        background: #3b82f6;
        color: white !important;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
        flex: none;
    }

    .mobile-nav-item.ai-center i {
        margin-bottom: 0;
        font-size: 26px;
    }

    /* YAN MENÜ (OFFCANVAS) */
    .offcanvas {
        background-color: #0f172a !important;
        color: white;
        width: 80% !important;
        max-width: 300px;
    }

    .offcanvas-header {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .mobile-sidebar-link {
        display: flex;
        align-items: center;
        padding: 14px 18px;
        color: #f8fafc !important;
        text-decoration: none !important;
        border-radius: 12px;
        margin-bottom: 6px;
        transition: background 0.2s;
    }

    .mobile-sidebar-link:hover {
        background: rgba(59, 130, 246, 0.1);
        color: #3b82f6 !important;
    }

    .mobile-sidebar-link i {
        width: 35px;
        font-size: 20px;
    }

    /* --- PREMIUM WALLET & DASHBOARD UI --- */
    
    .glass-card {
        background: rgba(30, 41, 59, 0.4);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 24px;
    }

    .neon-border-blue { border: 1px solid rgba(59, 130, 246, 0.3) !important; box-shadow: 0 0 15px rgba(59, 130, 246, 0.1); }
    .neon-border-green { border: 1px solid rgba(16, 185, 129, 0.3) !important; box-shadow: 0 0 15px rgba(16, 185, 129, 0.1); }

    .status-pill {
        padding: 4px 10px;
        border-radius: 10px;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .status-pill-success { background: rgba(16, 185, 129, 0.15); color: #10b981; }
    .status-pill-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
    .status-pill-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

    .pulse-animation {
        animation: neon-pulse 2s infinite ease-in-out;
    }

    @keyframes neon-pulse {
        0% { opacity: 0.6; transform: scale(0.98); }
        50% { opacity: 1; transform: scale(1); }
        100% { opacity: 0.6; transform: scale(0.98); }
    }

    .icon-circle-lg {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
    }

    .activity-row {
        padding: 14px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.02);
        margin-bottom: 10px;
        border: 1px solid rgba(255, 255, 255, 0.03);
        transition: transform 0.2s;
    }

    .activity-row:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.05);
    }
}