:root {
    --bg-base: #080808;
    --bg-surface: #0f0f0f;
    --bg-raised: #141414;
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --text-muted: #444444;
    --accent: #c8ff57;
    --accent-dim: rgba(200, 255, 87, 0.12);
    --accent-glow: rgba(200, 255, 87, 0.06);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(200, 255, 87, 0.25);
    --glow-green: 0 0 40px rgba(200, 255, 87, 0.08);
    --glow-white: 0 0 60px rgba(255, 255, 255, 0.03);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
    padding-top: 73px;
}

.font-display { font-family: 'Syne', sans-serif; }
.font-mono { font-family: 'Space Mono', monospace; }
.font-body { font-family: 'DM Sans', sans-serif; }

#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%);
}

@media (hover: hover) {
    .cursor-dot, .cursor-ring {
        position: fixed;
        top: 0; 
        left: 0;
        pointer-events: none;
        z-index: 99999;
        translate: -50% -50%;
    }
    .cursor-dot {
        width: 5px; 
        height: 5px;
        background: var(--accent);
        border-radius: 50%;
        transition: transform 0.05s;
    }
    .cursor-ring {
        width: 32px; 
        height: 32px;
        border: 1px solid rgba(200,255,87,0.4);
        border-radius: 50%;
        transition: transform 0.12s ease, width 0.3s, height 0.3s, border-color 0.3s;
    }
    .cursor-ring.hovered {
        width: 48px; 
        height: 48px;
        border-color: rgba(200,255,87,0.8);
    }
}

main { 
    position: relative; 
    z-index: 1; 
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(8, 8, 8, 0.95);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 6vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover { 
    color: var(--text-primary); 
}

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-button:hover {
    border-color: var(--border-hover);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #080808;
    font-weight: 700;
    font-size: 11px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-raised);
    color: var(--text-primary);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.dropdown-item.logout {
    color: #ff5555;
}

.dropdown-item.logout:hover {
    background: rgba(255, 85, 85, 0.1);
}

.notifications-menu {
    position: relative;
}

.notifications-button {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.notifications-button:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}

.notifications-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff5555;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 8px;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(255, 85, 85, 0.4);
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-height: 500px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    overflow: hidden;
}

.notifications-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.mark-all-read:hover {
    opacity: 0.8;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-raised);
}

.notification-item.unread {
    background: rgba(200, 255, 87, 0.05);
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.support-link:hover {
    background: var(--accent);
    color: #080808;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(200, 255, 87, 0.2);
}

.support-link svg {
    width: 16px;
    height: 16px;
}

footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 40px 6vw;
    margin-top: 120px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

@media (prefers-reduced-motion: no-preference) {
    [data-animate] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    [data-animate].visible {
        opacity: 1;
        transform: translateY(0);
    }
    [data-animate][data-delay="1"] { transition-delay: 0.1s; }
    [data-animate][data-delay="2"] { transition-delay: 0.2s; }
    [data-animate][data-delay="3"] { transition-delay: 0.3s; }
    [data-animate][data-delay="4"] { transition-delay: 0.4s; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(200,255,87,0.4); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 6px rgba(200,255,87,0); }
}

.mobile-menu-toggle {
    display: none;
}

.mobile-notifications {
    display: none;
}

.desktop-notifications {
    display: block;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 16px 20px;
        position: relative;
    }
    
    .nav-logo {
        font-size: 12px;
        z-index: 1002;
        position: relative;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-surface);
        border-left: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 24px;
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links::before {
        content: 'МЕНЮ';
        display: block;
        width: 100%;
        padding: 16px 0;
        margin-bottom: 16px;
        border-bottom: 2px solid var(--accent);
        font-family: 'Space Mono', monospace;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.2em;
        color: var(--accent);
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 16px 0;
        font-size: 16px;
        border-bottom: 1px solid var(--border);
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        gap: 12px;
        background: none;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        padding: 8px;
        z-index: 1002;
        position: relative;
    }
    
    .mobile-menu-toggle svg {
        width: 24px;
        height: 24px;
        transition: transform 0.3s;
    }
    
    .mobile-menu-toggle.open svg {
        transform: rotate(90deg);
    }
    
    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.8);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        z-index: 1000;
    }
    
    .mobile-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-notifications {
        display: block;
    }
    
    .notifications-button {
        width: 32px;
        height: 32px;
    }
    
    .notifications-button svg {
        width: 18px;
        height: 18px;
    }
    
    .notifications-dropdown {
        position: fixed;
        top: 60px;
        right: 20px;
        left: 20px;
        width: auto;
        max-height: calc(100vh - 80px);
        z-index: 1003;
    }
    
    .desktop-notifications {
        display: none;
    }
    
    .user-menu {
        width: 100%;
        margin-top: 16px;
    }
    
    .user-button {
        width: 100%;
        justify-content: flex-start;
        padding: 16px;
        border-radius: 8px;
    }
    
    .user-dropdown {
        position: static;
        width: 100%;
        margin-top: 8px;
        transform: none;
        box-shadow: none;
    }
    
    .user-menu.open .user-dropdown {
        transform: none;
    }
    
    .support-link {
        width: 100%;
        margin-top: 16px;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 13px;
    }
    
    .support-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .support-link svg {
        width: 14px;
        height: 14px;
    }
}
