/* Main stylesheet for Dimensional Relativity website with Enhanced Header */

/* Enhanced Color Variables */
:root {
    --primary-blue: #0c1e47;
    --secondary-blue: #1e3a8a;
    --accent-blue: #0ea5e9;
    --light-blue: #2196f3;
    --electric-cyan: #06ffff;
    --neon-green: #00ff41;
    --laser-red: #ff073a;
    --deep-purple: #533483;
    
    /* Blue-based backgrounds */
    --bg-primary: linear-gradient(135deg, #0c1e47 0%, #1e3a8a 50%, #0ea5e9 100%);
    --bg-secondary: linear-gradient(135deg, #1e3a8a 0%, #2196f3 50%, #06ffff 100%);
    --bg-card: rgba(30, 58, 138, 0.15);
    --bg-overlay: rgba(12, 30, 71, 0.95);
    
    /* Text colors */
    --text-primary: #fefefe;
    --text-secondary: #e0f2fe;
    --text-muted: rgba(224, 242, 254, 0.7);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #0f172a;
    background: linear-gradient(180deg, #f1f5f9 0%, #fefefe 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Enhanced Two-Tier Navigation */
.navbar {
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--electric-cyan);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(12, 30, 71, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Main Navigation Row */
.nav-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(6, 255, 255, 0.2);
}

/* Enhanced Brand Styling */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-brand .logo {
    width: 52px;
    height: 52px;
    filter: drop-shadow(0 0 15px rgba(6, 255, 255, 0.6));
    transition: all 0.3s ease;
}

.nav-brand:hover .logo {
    filter: drop-shadow(0 0 25px rgba(6, 255, 255, 0.9));
    transform: rotate(5deg) scale(1.05);
}

/* Enhanced Brand Text */
.brand-text {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, 
        var(--electric-cyan) 0%, 
        var(--neon-green) 25%, 
        var(--light-blue) 50%, 
        var(--deep-purple) 75%, 
        var(--electric-cyan) 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(6, 255, 255, 0.4);
    position: relative;
    transition: all 0.3s ease;
}

.brand-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(6, 255, 255, 0.15) 0%, 
        rgba(0, 255, 65, 0.15) 50%, 
        rgba(33, 150, 243, 0.15) 100%);
    filter: blur(25px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-brand:hover .brand-text {
    transform: scale(1.03);
    filter: brightness(1.3);
}

.nav-brand:hover .brand-text::after {
    opacity: 1;
}

/* Primary Navigation Menu */
.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    border: 2px solid transparent;
    position: relative;
    background: rgba(33, 150, 243, 0.1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--electric-cyan);
    background: rgba(6, 255, 255, 0.15);
    border-color: var(--electric-cyan);
    box-shadow: 0 0 20px rgba(6, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Enhanced Search Toggle */
.search-toggle {
    background: var(--bg-secondary);
    border: 3px solid var(--electric-cyan);
    color: var(--text-primary);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 255, 255, 0.3);
}

.search-toggle:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    transform: scale(1.1);
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(33, 150, 243, 0.2);
    border: 2px solid rgba(33, 150, 243, 0.3);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--light-blue);
    color: var(--text-primary);
    background: rgba(33, 150, 243, 0.4);
}

/* User Menu */
.user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-button {
    background: rgba(33, 150, 243, 0.2);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: rgba(33, 150, 243, 0.4);
    color: var(--text-primary);
    border-color: var(--light-blue);
}

.nav-button-primary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--light-blue);
}

.nav-button-primary:hover {
    background: var(--light-blue);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--electric-cyan);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Secondary Navigation Row */
.nav-secondary-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 0;
    gap: 2rem;
}

.secondary-nav-button {
    background: linear-gradient(135deg, var(--secondary-blue), var(--light-blue));
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
}

.secondary-nav-button::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;
}

.secondary-nav-button:hover::before {
    left: 100%;
}

.secondary-nav-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
    border-color: var(--electric-cyan);
}

.secondary-nav-button.community {
    background: linear-gradient(135deg, var(--deep-purple), var(--secondary-blue));
}

.secondary-nav-button.newsletter {
    background: linear-gradient(135deg, var(--light-blue), var(--electric-cyan));
}

.secondary-nav-button.forums {
    background: linear-gradient(135deg, var(--secondary-blue), var(--neon-green));
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 30, 71, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-container {
    max-width: 600px;
    width: 90%;
    position: relative;
}

.search-form {
    display: flex;
    background: var(--text-primary);
    border-radius: 50px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(6, 255, 255, 0.3);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    background: transparent;
}

.search-submit {
    background: var(--bg-secondary);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 2rem;
}

/* Gradient Animation */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
}

/* Content area */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Footer styles */
footer {
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .brand-text {
        font-size: 2rem;
    }
}

@media (max-width: 968px) {
    .nav-main-row {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(6, 255, 255, 0.2);
    }
    
    .brand-text {
        font-size: 1.8rem;
    }
    
    .secondary-nav-button {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .brand-text {
        font-size: 1.5rem;
    }
    
    .nav-brand .logo {
        width: 44px;
        height: 44px;
    }
    
    .nav-secondary-row {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .secondary-nav-button {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 1.3rem;
    }
    
    .nav-brand .logo {
        width: 38px;
        height: 38px;
    }
    
    .search-toggle {
        width: 48px;
        height: 48px;
    }
    
    .nav-secondary-row {
        padding: 0.5rem 0;
    }
    
    .secondary-nav-button {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}