:root {
    --glass-bg: rgba(15, 15, 26, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --horizon-purple: #8b5cf6;
    --button-gradient: linear-gradient(90deg, #2196f3, #ff00ff);
    --button-hover-gradient: linear-gradient(90deg, #1e88e5, #d500f9);
    --glow-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --primary: #667eea;
    --secondary: #764ba2;
    --pink: #ff00ff;
    --purple: #8b5cf6;
    --blue: #2196f3;
    --bg: #0a0a12;
    --bg-card: rgba(15, 15, 26, 0.6);
    --bg-glass: rgba(15, 15, 26, 0.8);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-muted: #a0a0b0;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff00ff 100%);
    --gradient-hover: linear-gradient(135deg, #764ba2 0%, #ff00ff 50%, #667eea 100%);
}

.navbar {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    font-family: 'Inter', sans-serif;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo:hover {
    text-decoration: none;
}

.nav-logo-img {
    height: 40px;
    width: 40px;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--horizon-purple);
    background: rgba(139, 92, 246, 0.1);
    text-decoration: none;
}

.nav-link.active {
    color: var(--horizon-purple);
    background: rgba(139, 92, 246, 0.15);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#auth-buttons {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    visibility: hidden;
    transition: width 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    will-change: width, opacity;
}

#auth-buttons.ready {
    opacity: 1;
    visibility: visible;
    width: auto;
    min-width: 40px;
}

#login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    white-space: nowrap;
    width: auto;
    min-width: 40px;
}

#login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#login-btn:hover::before {
    left: 100%;
}

#login-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

#login-btn .btn-text-spacer {
    width: 0.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--horizon-purple);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    background: transparent;
    color: var(--text-primary);
}

.btn-outline:hover {
    background: transparent;
    color: var(--horizon-purple);
    transform: scale(1.1);
}

.lang-selector {
    position: relative;
}

#lang-btn {
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.5rem;
}

.lang-flag-img {
    width: 20px;
    height: 12px;
    display: block;
    object-fit: contain;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 140px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.lang-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: inherit;
}

.lang-option:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--horizon-purple);
}

.lang-option .lang-flag-img {
    width: 20px;
    height: 12px;
    display: block;
    object-fit: contain;
}

.lang-option .lang-text {
    flex: 1;
}

.help-modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 320px;
    width: 100%;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.help-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.help-header-icon {
    width: 40px;
    height: 40px;
    background: var(--button-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.help-header-text h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.help-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.help-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.help-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.help-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.help-step:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--horizon-purple);
}

.help-step-number {
    width: 32px;
    height: 32px;
    background: var(--button-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.help-step-content {
    flex: 1;
}

.help-step-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.help-step-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.help-action {
    text-align: center;
}

.user-menu {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.user-btn:hover {
    transform: scale(1.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.user-arrow {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.user-menu.active .user-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 180px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-menu.active .user-dropdown,
.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.user-dropdown-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--horizon-purple);
}

.user-dropdown-item i {
    width: 16px;
    text-align: center;
}


@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        background: var(--glass-bg);
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        padding: 0.5rem 1rem;
        border-bottom: 1px solid var(--glass-border);
        z-index: 999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.open {
        display: flex;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
        border-radius: 8px;
        margin-bottom: 0.25rem;
    }
    
    .nav-toggle {
        display: flex;
    }

    .lang-dropdown {
        right: auto;
        left: 0;
    }
    
    .user-dropdown {
        right: 0;
        left: auto;
    }
    
    #login-btn {
        font-size: 0.85rem;
        padding: 0.625rem 1rem;
        min-height: 44px;
        gap: 0.5rem;
    }
    
    #login-btn .btn-text-spacer {
        width: 0.375rem;
    }
    
    #login-btn span:not(.btn-text-spacer) {
        display: inline;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .nav-logo-img {
        height: 32px;
        width: 32px;
    }
    
    .nav-auth {
        gap: 0.5rem;
    }
    
    #login-btn {
        font-size: 0.8rem;
        padding: 0.625rem 0.875rem;
        min-height: 44px;
        gap: 0.375rem;
        white-space: nowrap;
    }
    
    #login-btn span:not(.btn-text-spacer) {
        display: inline;
        font-size: 0.75rem;
    }
    
    #login-btn i {
        font-size: 0.9rem;
    }
    
    #login-btn .btn-text-spacer {
        width: 0.25rem;
    }
    
    .help-modal-content {
        max-width: 95%;
        padding: 1rem;
    }
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--gradient);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
}

.back-to-top:hover {
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5);
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

