/* CSS Variables - Matching your existing design */
:root {
    --sky-blue: #00c4ff;
    --sky-pink: #ff005e;
    --sky-green: #00ffb3;
    --sky-blue-light: rgba(0, 196, 255, 0.1);
    --sky-pink-light: rgba(255, 0, 94, 0.1);
    --sky-green-light: rgba(0, 255, 179, 0.1);
    --light-bg: #ffffff;
    --card-bg: #f8f9fa;
    --card-hover: #f1f3f4;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #9aa0a6;
    --border-light: #dadce0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.container {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: var(--light-bg);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
	left: 0;
	right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}





.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 1002;
}

.logo-link:hover {
    transform: scale(1.03);
}

.logo-text {
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink), var(--sky-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--sky-blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-login {
    background-color: transparent;
    border: 1px solid var(--border-light);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-login:hover {
    background-color: var(--card-bg);
    color: var(--sky-blue);
    border-color: var(--sky-blue);
}

.btn-glow {
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink));
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 196, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 196, 255, 0.4);
}

/* User Profile Dropdown */
.user-profile {
    position: relative;
    display: none;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 50px;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    user-select: none;
}

.profile-info:hover {
    background: var(--card-hover);
    transform: translateY(-1px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-blue), var(--sky-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--light-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    padding: 10px 0;
    min-width: 200px;
    z-index: 1001;
    display: none;
    border: 1px solid var(--border-light);
    margin-top: 5px;
}

.profile-dropdown.show {
    display: block;
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: none;
}

.profile-dropdown a:hover {
    background: var(--card-bg);
    color: var(--sky-blue);
    padding-left: 25px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

.user-info {
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    color: var(--sky-blue);
}

/* Mobile Responsive Styles - FIXED OVERLAPPING ISSUE */
@media (max-width: 768px) {
    .header-container {
        padding: 0 10px;
        height: 60px;
        flex-wrap: wrap;
    }
    
    /* Mobile Menu Styles - FIXED OVERLAPPING */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--light-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-hover);
        border-top: 1px solid var(--border-light);
        gap: 0;
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--border-light);
        margin: 0;
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }
    
    .nav-links a {
        display: block;
        padding: 15px 0;
        font-size: 1rem;
        width: 100%;
        text-align: left;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .header-right {
        display: none;
        position: absolute;
        top: 100%; /* This was causing overlap - FIXED */
        left: 0;
        width: 100%;
        background-color: var(--light-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-hover);
        border-top: 1px solid var(--border-light);
        gap: 15px;
        align-items: stretch;
        z-index: 998; /* Lower z-index than nav-links */
        margin-top: 0;
    }
    
    /* KEY FIX: Position header-right below nav-links when both are active */
    .nav-links.active + .header-right.active {
        top: auto;
        position: relative;
        box-shadow: none;
        border-top: none;
        padding-top: 0;
    }
    
    .header-right.active {
        display: flex !important;
        position: relative;
        top: auto;
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .btn-login, .btn-glow {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 1rem;
        margin: 0;
    }
    
    .user-profile {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    
    .profile-info {
        justify-content: center;
        width: 100%;
        padding: 12px;
    }
    
    .profile-dropdown {
        position: relative;
        width: 100%;
        box-shadow: none;
        border: 1px solid var(--border-light);
        margin-top: 10px;
        top: auto;
        right: auto;
        display: none;
    }
    
    .profile-dropdown.show {
        display: block;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Ensure proper stacking */
    .logo-link {
        z-index: 1002;
        position: relative;
    }
    
    .mobile-menu-btn {
        z-index: 1002;
        position: relative;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .auth-modal {
        padding: 10px;
    }
    
    .auth-modal .modal-content {
        margin: 0;
        width: 100%;
        max-height: 95vh;
    }
    
    .auth-header, .social-auth, .auth-divider, .auth-modal form {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .toast {
        min-width: calc(100% - 40px);
        margin: 0 20px;
    }
}

/* Ensure mobile menu items are visible when active */
@media (max-width: 768px) {
    .nav-links.active,
    .header-right.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* NEW FIX: Stack nav-links and header-right vertically without overlap */
    .nav-links.active {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
    }
    
    .header-right.active {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        margin-top: 0;
    }
    
    /* When both are active, header-right comes after nav-links */
    .nav-links.active ~ .header-right.active {
        position: relative;
        top: auto;
        margin-top: 0;
        border-top: 1px solid var(--border-light);
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 55px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .auth-buttons {
        max-width: 100%;
    }
    
    .auth-modal .modal-content {
        border-radius: 12px;
    }
    
    .auth-header {
        padding: 20px 15px 10px;
    }
    
    .social-auth, .auth-divider, .auth-modal form {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .auth-footer {
        padding: 15px 15px 20px;
    }
    
    .toast {
        min-width: calc(100% - 20px);
        margin: 0 10px;
        padding: 12px 15px;
    }
    
    /* Mobile menu adjustments for very small screens */
    .nav-links {
        padding: 15px;
    }
    
    .header-right {
        padding: 15px;
    }
    
    .nav-links a {
        padding: 12px 0;
        font-size: 0.95rem;
    }
}

/* Rest of your existing CSS remains the same below this line */
/* ... (keep all your existing auth modal, toast, footer styles) */

/* Auth Modals */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-modal.active {
    display: flex;
}

.auth-modal .modal-content {
    background: var(--light-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.auth-modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--sky-pink);
    background: var(--card-bg);
}

.auth-header {
    text-align: center;
    padding: 30px 25px 15px;
}

.auth-header h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-auth {
    padding: 0 25px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-google, .btn-github {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 50px;
    background: var(--light-bg);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    border: none;
}

.btn-google:hover {
    border-color: var(--sky-blue);
    box-shadow: 0 2px 8px rgba(0, 196, 255, 0.2);
}

.btn-github:hover {
    border-color: var(--sky-pink);
    box-shadow: 0 2px 8px rgba(255, 0, 94, 0.2);
}

.auth-divider {
    text-align: center;
    padding: 0 25px 15px;
    position: relative;
}

.auth-divider span {
    background: var(--light-bg);
    padding: 0 15px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.auth-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 25px;
    right: 25px;
    height: 1px;
    background: var(--border-light);
}

.auth-modal form {
    padding: 0 25px 25px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-light);
    border-radius: 50px;
    background: var(--light-bg);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px var(--sky-blue-light);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.8rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.forgot-password {
    color: var(--sky-blue);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.8rem;
}

.forgot-password:hover {
    color: var(--sky-pink);
}

.btn-primary {
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 196, 255, 0.4);
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.auth-footer {
    text-align: center;
    padding: 15px 25px 25px;
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-footer a {
    color: var(--sky-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--sky-pink);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: var(--shadow-hover);
    border-left: 4px solid var(--sky-blue);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: var(--sky-green);
}

.toast.error {
    border-left-color: var(--sky-pink);
}

.toast.warning {
    border-left-color: #ff9500;
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--sky-green);
}

.toast.error i {
    color: var(--sky-pink);
}

.toast.warning i {
    color: #ff9500;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-weight: 500;
    margin-bottom: 2px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Footer Styles */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 15px 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.footer-logo span {
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink), var(--sky-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-links h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 8px;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink));
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--sky-blue);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 15px;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.footer-legal a:hover {
    color: var(--sky-blue);
}