/* Navbar Styles */
.navbar {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Dark theme support for navbar */
body.dark-theme .navbar {
    background: transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

body.dark-theme .logo {
    color: #58a6ff;
}

body.dark-theme .logo-icon {
    background: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
}

body.dark-theme .nav-link {
    color: #c9d1d9;
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-link.active {
    color: #58a6ff;
}

body.dark-theme .nav-link.active::after {
    background: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
}

body.dark-theme .btn-outline {
    color: var(--bs-body-bg-rgb);
    border-color: var(--border-secondary);
}

body.dark-theme .btn-primary {
    background: var(--ai-gradient-2);
    color: var(--bg-light);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

body.dark-theme .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.4);
}

body.dark-theme .lang-toggle-btn {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.2);
    color: #58a6ff;
}

body.dark-theme .lang-toggle-btn:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: rgba(88, 166, 255, 0.4);
}

body.dark-theme .dropdown-content {
    background: #161b22;
    border: 1px solid #30363d;
}

body.dark-theme .dropdown-content a {
    color: #c9d1d9;
}

body.dark-theme .dropdown-content a:hover {
    background: #21262d;
    color: #58a6ff;
}

/* Transparent variant for auth pages */
body.auth-page .navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
    border-bottom: none;
}

body.auth-page .logo {
    color: #fff;
}

body.auth-page .logo-icon {
    background: rgba(255, 255, 255, 0.2);
}

body.auth-page .nav-link {
    color: #fff;
}

body.auth-page .nav-link:hover,
body.auth-page .nav-link.active {
    opacity: 0.8;
}

body.auth-page .nav-link.active::after {
    background: #fff;
}

body.auth-page .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

body.auth-page .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

body.auth-page .btn-primary {
    background: #fff;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

body.auth-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

body.auth-page .lang-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

body.auth-page .lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #667eea;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.logo:hover {
    opacity: 0.9;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.chevron-icon {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.nav-dropdown.active .chevron-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 240px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 8px;
    padding: 8px 0;
    border: 1px solid #e1e4e8;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: #24292e;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown-content a:hover {
    background: #f6f8fa;
    border-left-color: #667eea;
    color: #667eea;
}

.dropdown-content a:hover i {
    transform: scale(1.2) rotate(5deg);
    color: #667eea;
}

.dropdown-content a:focus {
    outline: 2px solid var(--ai-gradient-3);
    outline-offset: -2px;
    background: var(--ai-gradient-2);
}

.dropdown-content a i {
    width: 16px;
    text-align: center;
    transition: transform 0.3s ease, color 0.2s ease;
}

/* Hover for desktop */
@media (min-width: 993px) {
    .nav-dropdown:hover .dropdown-content {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

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

/* Click behavior for all devices */
.nav-dropdown.active .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link.active {
    color: #667eea;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.btn {
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    padding: 10px 20px;
    background:linear-gradient(#18183c, #18183c) padding-box, var(--ai-gradient-2) border-box;
    border: 2px solid transparent !important;
    border-radius: 10px;
}


/* Language Switcher - Chat Interface Style */
.lang-switcher {
    position: relative;
}

.lang-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    color: #3b82f6;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.lang-toggle-btn i {
    font-size: 16px;
}

.lang-text {
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

/* RTL Support */
[dir="rtl"] .navbar {
    direction: rtl;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 992px) {
    .navbar {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
        width: 100%;
        margin-top: 15px;
    }

    .nav-link {
        font-size: 14px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        gap: 10px;
    }
}
