/* ================================================
   MODIF-AI - ORTAK NAVBAR & GLOBAL STİLLER
   Modern üst menü sistemi (Sidebar yerine)
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- GLOBAL RESET & TYPOGRAPHY --- */
*, *::before, *::after { box-sizing: border-box; }

/* --- ÜST NAVBAR --- */
.navbar {
    width: 100%;
    background: rgba(5, 5, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 210, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 65px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 5, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* SOL: Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
}
.nav-logo:hover { transform: scale(1.03); }
.nav-logo img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #007bff;
    transition: 0.3s;
}
.nav-logo:hover img { border-color: #00d2ff; box-shadow: 0 0 12px rgba(0, 210, 255, 0.5); }
.nav-logo span {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

/* ORTA: Menü Linkleri */
.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-item > a,
.nav-item > .nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    background: transparent;
}

.nav-item > a:hover,
.nav-item > .nav-dropdown-toggle:hover,
.nav-item > a.active,
.nav-item > .nav-dropdown-toggle.active {
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.08);
    border-color: rgba(0, 210, 255, 0.15);
}

.nav-item > a.active {
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.12);
    border-color: rgba(0, 210, 255, 0.25);
}

/* DROPDOWN */
.dropdown-chevron {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.nav-item:hover .dropdown-chevron {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    min-width: 220px;
    background: rgba(10, 10, 25, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 14px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 123, 255, 0.1);
    z-index: 2000;
}

.nav-item:hover > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-dropdown a i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: #007bff;
    transition: 0.2s;
}

.nav-dropdown a:hover {
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
    padding-left: 22px;
}

.nav-dropdown a:hover i {
    color: #00d2ff;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 10px;
}

/* SAĞ: Bildirim ve Hesap */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Bildirim Butonu */
.nav-notification-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    font-size: 1.05rem;
}

.nav-notification-btn:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.3);
    color: #00d2ff;
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 9px;
    height: 9px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid rgba(5, 5, 15, 0.9);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Hesap Butonu */
.nav-account-wrapper {
    position: relative;
}

.nav-account-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 123, 255, 0.5);
    background: linear-gradient(135deg, #007bff, #00d2ff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.nav-account-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.5);
    border-color: #00d2ff;
}

/* Hesap Dropdown */
.account-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: rgba(10, 10, 25, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 14px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.25s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 123, 255, 0.1);
    z-index: 2000;
}

.account-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.account-dropdown-header .name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
}

.account-dropdown-header .email {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.account-dropdown a,
.account-dropdown button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.account-dropdown a i,
.account-dropdown button i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: #007bff;
    transition: 0.2s;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
}

.account-dropdown a:hover i,
.account-dropdown button:hover i {
    color: #00d2ff;
}

.account-dropdown .logout-btn {
    color: #ff4757;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 4px;
    padding-top: 12px;
    border-radius: 0 0 10px 10px;
}

.account-dropdown .logout-btn i {
    color: #ff4757;
}

.account-dropdown .logout-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    color: #ff6b7a;
}

/* --- OVERLAY (Dropdown kapatmak için) --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: none;
}
.nav-overlay.show { display: block; }

/* --- MOBİL HAMBURGER (sadece mobilde görünür) --- */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
}

.mobile-menu-btn:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.3);
    color: #00d2ff;
}

/* --- MOBİL UYUM --- */
@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 65px;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 15, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        padding: 15px;
        gap: 5px;
        border-bottom: 1px solid rgba(0, 210, 255, 0.15);
        transform: translateY(-120%);
        opacity: 0;
        transition: all 0.35s ease;
        z-index: 999;
    }

    .nav-links.mobile-open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-item > a,
    .nav-item > .nav-dropdown-toggle {
        width: 100%;
        padding: 14px 18px;
        font-size: 1rem;
    }

    .nav-dropdown {
        position: static;
        transform: none;
        min-width: 100%;
        background: rgba(0, 0, 0, 0.4);
        box-shadow: none;
        border: none;
        border-left: 2px solid rgba(0, 210, 255, 0.3);
        border-radius: 0 10px 10px 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        padding: 0;
        margin-left: 15px;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .nav-item.mobile-dropdown-open > .nav-dropdown {
        max-height: 400px;
        padding: 8px;
    }

    .nav-item:hover > .nav-dropdown {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

/* --- AÇIK TEMA OVERRIDE --- */
body.acik-tema .navbar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
body.acik-tema .navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
body.acik-tema .nav-logo span {
    color: #111;
    text-shadow: none;
}
body.acik-tema .nav-item > a,
body.acik-tema .nav-item > .nav-dropdown-toggle {
    color: #333;
}
body.acik-tema .nav-item > a:hover,
body.acik-tema .nav-item > .nav-dropdown-toggle:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.06);
    border-color: rgba(0, 123, 255, 0.1);
}
body.acik-tema .nav-item > a.active {
    color: #007bff;
    background: rgba(0, 123, 255, 0.08);
    border-color: rgba(0, 123, 255, 0.15);
}
body.acik-tema .nav-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}
body.acik-tema .nav-dropdown a {
    color: #333;
}
body.acik-tema .nav-dropdown a:hover {
    background: rgba(0, 123, 255, 0.06);
    color: #007bff;
}
body.acik-tema .nav-notification-btn {
    color: #555;
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
}
body.acik-tema .nav-notification-btn:hover {
    color: #007bff;
    border-color: rgba(0, 123, 255, 0.2);
    background: rgba(0, 123, 255, 0.06);
}
body.acik-tema .account-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}
body.acik-tema .account-dropdown-header .name { color: #111; }
body.acik-tema .account-dropdown-header .email { color: #888; }
body.acik-tema .account-dropdown a,
body.acik-tema .account-dropdown button { color: #333; }
body.acik-tema .account-dropdown a:hover,
body.acik-tema .account-dropdown button:hover {
    background: rgba(0, 123, 255, 0.06);
    color: #007bff;
}
body.acik-tema .mobile-menu-btn {
    color: #333;
    border-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    body.acik-tema .nav-links {
        background: rgba(255, 255, 255, 0.98);
        border-bottom-color: rgba(0, 0, 0, 0.08);
    }
    body.acik-tema .nav-dropdown {
        background: rgba(0, 123, 255, 0.03);
        border-left-color: rgba(0, 123, 255, 0.2);
    }
}
