/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');

/* Define CSS Variables for the theme */
:root {
    --background-primary: #121212;
    --background-secondary: #1E1E1E;
    --background-tertiary: #2A2A2A;
    --primary-accent: #00A8FF;
    --text-primary: #EAEAEA;
    --text-secondary: #B0B0B0;
    --shadow-color: rgba(0, 168, 255, 0.2);
}

/* Base header styling */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--background-tertiary);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    position: relative;
}

/* Logo and Academy Name Styling */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: float 6s ease-in-out infinite;
    z-index: 1002;
}

.logo-svg {
    height: 50px;
    flex-shrink: 0;
}

.logo-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    margin: 0;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: center;
}

/* Navigation Links Styling */
.nav-container {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.nav-links {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    padding: 10px 15px;
    position: relative;
    transition: all 0.3s ease;
}

/* Underline effect for nav links */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-accent);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Active link styling */
.nav-links a.active {
    color: var(--primary-accent);
    font-weight: 500;
}

.nav-links a.active::after {
    width: 50%;
}

/* Profile Button Styling */
.profile-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--background-tertiary);
    padding: 8px 15px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 1002;
}

.profile-button:hover {
    background-color: #3a3a3a;
    transform: translateY(-2px);
}

.profile-img {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

/* Profile Dropdown */
.profile-dropdown-container {
    position: relative;
    z-index: 1002;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: var(--background-secondary);
    border: 1px solid var(--background-tertiary);
    border-radius: 8px;
    width: 200px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    z-index: 1001;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

/* Show dropdown on hover or when an element inside is focused */
.profile-dropdown-container:hover .dropdown-menu,
.profile-dropdown-container:focus-within .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--background-tertiary);
    color: var(--text-primary);
}

.dropdown-item.danger:hover {
    color: #fff;
    background-color: #e74c3c;
}

/* Floating animation for the logo */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile Responsive Styles */
@media (max-width: 968px) {
    .header-container {
        padding: 12px 15px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--background-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 80px 20px 40px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        transition: right 0.3s ease-in-out;
    }
    
    .nav-container.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 15px;
        font-size: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .profile-name {
        display: none;
    }
    
    .logo-svg {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px;
    }
    
    .logo-svg {
        height: 35px;
    }
    
    .profile-button {
        padding: 6px 12px;
    }
    
    .profile-img {
        height: 30px;
        width: 30px;
    }
}