/* ═══════════════════════════════════════════════════════════
   Server Hub — Shared Styles
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-card: rgba(15, 20, 40, 0.85);
    --bg-card-hover: rgba(20, 28, 55, 0.9);
    --accent-red: #e63946;
    --accent-red-glow: rgba(230, 57, 70, 0.4);
    --accent-white: #f1faee;
    --accent-blue: #457b9d;
    --accent-blue-light: #a8dadc;
    --accent-gold: #ffd166;
    --text-primary: #e8eaf0;
    --text-secondary: #8892a8;
    --text-muted: #5a6478;
    --border: rgba(255, 255, 255, 0.06);
    --success: #06d6a0;
    --navbar-height: 64px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Animated Background ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(69, 123, 157, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(230, 57, 70, 0.08), transparent);
    z-index: 0;
}

.particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent-blue-light);
    border-radius: 50%;
    opacity: 0;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.2; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-brand svg {
    width: 32px;
    height: 32px;
}

.nav-brand span {
    background: linear-gradient(135deg, var(--accent-white), var(--accent-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent-blue-light);
    background: rgba(69, 123, 157, 0.15);
}

.nav-link .nav-icon {
    font-size: 1.1rem;
}

/* Server dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-dropdown-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-btn svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    list-style: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-dropdown-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown-item.active {
    color: var(--accent-blue-light);
    background: rgba(69, 123, 157, 0.1);
}

.nav-dropdown-icon {
    font-size: 1.3rem;
}

.nav-dropdown-text {
    display: flex;
    flex-direction: column;
}

.nav-dropdown-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-dropdown-version {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Mobile menu button */
.nav-mobile-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    cursor: pointer;
}

.nav-mobile-btn svg {
    width: 24px;
    height: 24px;
}

/* Page content padding for navbar */
.has-navbar {
    padding-top: var(--navbar-height);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }

    .nav-links {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-mobile-btn {
        display: block;
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 4px;
        background: rgba(255, 255, 255, 0.03);
    }
}
