:root {
    --bg-base: #080808;
    --bg-surface: #0f0f0f;
    --bg-raised: #141414;
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --text-muted: #555555;
    --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);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

html {
    overscroll-behavior: none;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 12px 24px;
    background: var(--accent);
    color: #080808;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    z-index: 10000;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 16px;
}

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;
}

body.menu-open {
    overflow: hidden;
}

.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;
}
@media (max-width: 768px) {
    main { padding-top: 56px; }
    /* Hero overrides padding-top itself */
    main > .hero { margin-top: -56px; padding-top: calc(56px + 32px); }
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background: rgba(8, 8, 8, 0.88);
    transition: background 0.3s, border-color 0.3s;
}
nav.scrolled {
    background: rgba(8, 8, 8, 0.97);
    border-color: rgba(255,255,255,0.07);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 6vw;
    height: 64px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

/* Mobile panel hidden on desktop — keep it out of layout and interaction */
@media (min-width: 769px) {
    .nav-links {
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}
.nav-logo:hover { color: var(--accent); }
.nav-logo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    animation: pulse 2.5s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent);
}

/* Center nav links — desktop wrapper */
.nav-links-desktop {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

/* Mobile panel — outside nav, positioned relative to viewport */
.nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #090909;
    padding: 32px 24px 40px;
    z-index: 200;
    overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,0.08);
    /* Slide animation */
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}
.nav-link-admin {
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav-link-admin:hover { color: #b8ef47; }

/* Right actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Icon button (notifications) */
.nav-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-icon-btn:hover {
    color: var(--text-primary);
    border-color: var(--border);
    background: rgba(255,255,255,0.04);
}

/* Nav CTA buttons (unauth) */
.nav-btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.nav-btn-ghost:hover { color: var(--text-primary); border-color: #444; }

.nav-btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #080808;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}
.nav-btn-primary:hover { background: #b8ef47; transform: translateY(-1px); }

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.user-button:hover {
    border-color: rgba(200,255,87,0.3);
    background: rgba(255,255,255,0.06);
}
.user-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}
.user-chevron { color: var(--text-muted); flex-shrink: 0; margin-right: 2px; }

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #080808;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown user header */
.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 14px;
}
.dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #080808;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.dropdown-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.dropdown-email {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.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;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

.dropdown-item.logout:hover {
    background: rgba(255, 85, 85, 0.1);
    color: #ff5555;
}

.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% + 8px);
    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.15s ease;
    z-index: 1000;
}

.dropdown-arrow {
    position: absolute;
    top: -7px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--bg-surface);
    z-index: 1001;
}

.dropdown-arrow::before {
    content: '';
    position: absolute;
    top: 1px;
    left: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--border);
}

.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;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.notifications-list::-webkit-scrollbar {
    width: 4px;
}

.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.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: 60px 6vw 40px;
    margin-top: 120px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
    text-decoration: none;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-column h4 {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.footer-social a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@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.08s; }
    [data-animate][data-delay="2"] { transition-delay: 0.16s; }
    [data-animate][data-delay="3"] { transition-delay: 0.24s; }
    [data-animate][data-delay="4"] { transition-delay: 0.32s; }
    [data-animate][data-delay="5"] { transition-delay: 0.40s; }
    [data-animate][data-delay="6"] { transition-delay: 0.48s; }
}

@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;
}

@media (max-width: 768px) {
    /* ── Nav container: flex instead of grid ── */
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        height: 56px;
        gap: 0;
    }

    /* ── Hide desktop nav links on mobile ── */
    .nav-links-desktop { display: none; }

    /* ── Mobile panel label ── */
    .nav-links::before {
        content: 'НАВИГАЦИЯ';
        font-family: 'Space Mono', monospace;
        font-size: 10px;
        letter-spacing: 0.2em;
        color: var(--accent);
        margin-bottom: 20px;
        display: block;
        opacity: 0.6;
    }
    .nav-link {
        width: 100%;
        padding: 15px 0;
        font-size: 18px;
        font-weight: 600;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        border-radius: 0;
        background: none;
        color: rgba(255,255,255,0.85);
    }
    .nav-link:hover { color: var(--accent) !important; background: none !important; }
    .nav-link:last-child { border-bottom: none; }

    /* ── Right actions: compact ── */
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    /* Show login/register buttons on mobile */
    .nav-actions .nav-btn-ghost,
    .nav-actions .nav-btn-primary {
        display: inline-flex;
        padding: 6px 12px;
        font-size: 12px;
    }
    /* Show user-button but compact (only avatar) */
    .user-name,
    .user-chevron {
        display: none;
    }
    .user-button {
        padding: 4px;
        background: transparent;
        border-color: transparent;
        border-radius: 8px;
        gap: 0;
    }
    .user-button:hover {
        border-color: var(--border);
        background: rgba(255,255,255,0.05);
    }
    /* Dropdown still works from top-right */
    .user-dropdown {
        position: fixed;
        top: 60px;
        right: 12px;
        left: auto;
        min-width: 200px;
        transform: translateY(-6px) scale(0.97);
    }
    .user-menu.open .user-dropdown {
        transform: translateY(0) scale(1);
    }

    /* ── Hamburger ── */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text-primary);
        cursor: pointer;
        padding: 7px;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    .mobile-menu-toggle svg { width: 18px; height: 18px; }
    .mobile-menu-toggle svg path {
        transition: all 0.3s ease;
        transform-origin: center;
    }
    .mobile-menu-toggle.open .menu-icon-top { transform: translateY(5px) rotate(45deg); }
    .mobile-menu-toggle.open .menu-icon-mid { opacity: 0; }
    .mobile-menu-toggle.open .menu-icon-bot { transform: translateY(-5px) rotate(-45deg); }

    /* ── Notifications ── */
    .notifications-dropdown {
        position: fixed;
        top: 60px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 80px);
        z-index: 1003;
        border-radius: 12px;
    }

    /* ── Overlay: hidden on mobile (menu is full-screen) ── */
    .mobile-overlay { display: none !important; }
}

@media (max-width: 1024px) {
    .nav-links-desktop {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 13px;
    }
    
    .support-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .support-link svg {
        width: 14px;
        height: 14px;
    }
}

/* Focus Visible Styles */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.form-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.nav-link:focus-visible {
    outline: none;
    color: var(--accent);
}

.user-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dropdown-item:focus-visible {
    outline: none;
    background: var(--bg-raised);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.notifications-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    min-width: 280px;
    max-width: 400px;
    animation: toastIn 0.3s ease-out forwards;
    font-size: 14px;
}

.toast.toast-out {
    animation: toastOut 0.2s ease-in forwards;
}

.toast.success {
    border-color: rgba(87, 255, 87, 0.3);
}

.toast.error {
    border-color: rgba(255, 85, 85, 0.3);
}

.toast.info {
    border-color: var(--border-accent);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: #57ff57; }
.toast.error .toast-icon { color: #ff5555; }
.toast.info .toast-icon { color: var(--accent); }

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-surface) 0%,
        var(--bg-raised) 50%,
        var(--bg-surface) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-btn {
    height: 44px;
    width: 120px;
}

.skeleton-notification {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
}

.btn-primary.btn-loading::after {
    border-top-color: #080808;
}

.btn-ghost.btn-loading::after {
    border-top-color: var(--text-primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Page Progress Bar */
.page-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #a0ff20);
    z-index: 10001;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(200, 255, 87, 0.5);
}

.page-progress-bar.page-progress-complete {
    background: linear-gradient(90deg, var(--accent), #57ff57);
}

/* Cursor Toggle for Accessibility */
.cursor-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.cursor-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

body.cursor-disabled .cursor-dot,
body.cursor-disabled .cursor-ring {
    display: none !important;
}

/* Key Expiry Progress Bar */
.key-expiry-progress {
    width: 100%;
    height: 4px;
    background: var(--bg-raised);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.key-expiry-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.key-expiry-progress-bar.high {
    background: linear-gradient(90deg, #57ff57, #a0ff20);
}

.key-expiry-progress-bar.medium {
    background: linear-gradient(90deg, #ffc857, #ffaa00);
}

.key-expiry-progress-bar.low {
    background: linear-gradient(90deg, #ff5555, #ff8855);
}

/* Card Hover Tilt Effect */
.card-tilt {
    transform-style: preserve-3d;
    perspective: 1000px;
}

@media (max-width: 768px) {
    .page-progress-bar {
        height: 2px;
    }
}
