/*********************************************
 ** RagnaGhost Theme - ULTRA PREMIUM V2
 ** Concept: Digital Ghost / Spectral HUD
 *********************************************/

@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    /* Spectral Color Palette */
    --ghost-bg: #030305;
    --ghost-surface: #0a0a0f;
    --ghost-card: rgba(13, 13, 20, 0.7);
    --ghost-border: rgba(168, 85, 247, 0.3);

    --primary: #c084fc;
    /* Lighter, more spectral purple */
    --primary-glow: rgba(192, 132, 252, 0.5);
    --secondary: #2dd4bf;
    /* Spectral Cyan for contrast (Ghostly fire) */
    --secondary-glow: rgba(45, 212, 191, 0.4);

    --text-main: #f8fafc;
    --text-dim: #64748b;

    --font-heading: 'Syncopate', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    --neon-shadow: 0 0 15px var(--primary-glow);
    --transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--ghost-bg);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ===== NEW SPECTRAL HUD HEADER ===== */
.ghost-header {
    padding: 2rem 0;
    position: relative;
    z-index: 100;
}

.hud-top-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hud-nav {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--ghost-border);
    padding: 0.75rem 2rem;
    border-radius: 4px;
    /* More angular, less rounded than DaggerRO */
    clip-path: polygon(5% 0, 100% 0, 95% 100%, 0% 100%);
    display: flex;
    gap: 3rem;
}

.hud-nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: var(--transition);
}

.hud-nav a:hover,
.hud-nav a.active {
    color: var(--primary);
    text-shadow: var(--neon-shadow);
}

/* ===== LAYOUT Structure ===== */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 320px 1fr;
    /* Profile on the LEFT, different from DaggerRO */
    gap: 4rem;
}

/* ===== GHOST CARDS (Angular/Tech) ===== */
.ghost-card {
    background: var(--ghost-card);
    border: 1px solid var(--ghost-border);
    padding: 2.5rem;
    position: relative;
    backdrop-filter: blur(10px);
    clip-path: polygon(0 0, 97% 0, 100% 3%, 100% 100%, 3% 100%, 0 97%);
    /* Angular corners */
}

.ghost-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* Sidebar Widgets */
.sidebar-widget {
    margin-bottom: 3rem;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.widget-title::before {
    content: '';
    width: 4px;
    height: 15px;
    background: var(--secondary);
    box-shadow: 0 0 10px var(--secondary-glow);
}

/* Buttons */
.ghost-btn {
    background: var(--primary);
    color: #000;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1.25rem 2.5rem;
    border: none;
    cursor: pointer;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.ghost-btn:hover {
    background: var(--secondary);
    transform: skewX(-5deg);
}

.ghost-btn-outline {
    background: transparent;
    border: 1px solid var(--ghost-border);
    color: var(--primary);
}

/* Inputs */
.ghost-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--ghost-border);
    padding: 1rem;
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

.ghost-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 15px var(--secondary-glow);
}

/* Footer Rendering */
.ghost-footer {
    border-top: 1px solid var(--ghost-border);
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.05));
}

/* Animations */
@keyframes spectral-glitch {
    0% {
        transform: translate(0);
        filter: drop-shadow(0 0 20px var(--primary-glow));
    }

    10% {
        transform: translate(-2px, 1px);
        filter: drop-shadow(0 0 25px var(--secondary-glow));
    }

    20% {
        transform: translate(2px, -1px);
    }

    30% {
        transform: translate(-1px, -2px);
    }

    40% {
        transform: translate(1px, 2px);
    }

    50% {
        transform: translate(0);
        filter: drop-shadow(0 0 20px var(--primary-glow));
    }

    100% {
        transform: translate(0);
    }
}

.glitch-logo {
    animation: spectral-glitch 4s infinite linear;
}

/* Responsive */
@media (max-width: 1100px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Hide hamburger on desktop */
#mobile-menu-toggle {
    display: none;
}

/* Tablet Responsive */
@media (max-width: 768px) {

    /* Header Adjustments */
    header {
        padding: 1rem !important;
    }

    .logo-container {
        flex-direction: column;
        text-align: center;
    }

    .logo-container img {
        max-width: 120px !important;
    }

    .online-counter {
        display: none !important;
    }

    /* Show Mobile Menu Toggle */
    #mobile-menu-toggle {
        display: block !important;
        position: fixed !important;
        top: 1.5rem !important;
        right: 1.5rem !important;
        z-index: 10001 !important;
        background: rgba(10, 10, 15, 0.9) !important;
        padding: 0.8rem !important;
        border-radius: 8px !important;
        border: 2px solid var(--primary) !important;
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.5) !important;
    }

    #mobile-menu-toggle div {
        width: 25px !important;
        height: 3px !important;
        background: var(--primary) !important;
        margin: 5px 0 !important;
        transition: 0.3s !important;
        border-radius: 2px !important;
    }

    /* Mobile Navigation */
    .hud-nav {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding: 6rem 2rem 2rem !important;
        gap: 0 !important;
        border-left: 3px solid var(--primary) !important;
        box-shadow: -10px 0 50px rgba(168, 85, 247, 0.3) !important;
        z-index: 10000 !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        display: flex !important;
    }

    .hud-nav.active {
        transform: translateX(0) !important;
    }

    .hud-nav a {
        display: block !important;
        padding: 1.5rem 1rem !important;
        margin: 0.5rem 0 !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        text-align: left !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        color: #ffffff !important;
        transition: all 0.3s !important;
        cursor: pointer !important;
        border: 1px solid rgba(168, 85, 247, 0.2) !important;
        position: relative !important;
        z-index: 10001 !important;
    }

    .hud-nav a:hover,
    .hud-nav a:active {
        background: rgba(168, 85, 247, 0.2) !important;
        border-color: var(--primary) !important;
        transform: translateX(5px) !important;
        color: var(--primary) !important;
    }

    /* Grid Adjustments */
    .pvp-layout,
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Card Adjustments */
    .ghost-card {
        padding: 1.5rem !important;
    }

    /* Typography */
    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.3rem !important;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {

    /* Header */
    header {
        padding: 0.75rem !important;
    }

    .logo-container img {
        max-width: 100px !important;
    }

    #mobile-menu-toggle {
        top: 1rem;
        right: 1rem;
    }

    .hud-nav {
        width: 100%;
    }

    /* Main Content */
    .main-panel {
        padding: 1rem !important;
    }

    .ghost-card {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }

    /* Typography */
    h1 {
        font-size: 1.5rem !important;
        letter-spacing: -1px !important;
    }

    h2 {
        font-size: 1.1rem !important;
    }

    /* Buttons */
    .ghost-btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.7rem !important;
    }

    /* Tables */
    table {
        font-size: 0.75rem !important;
    }

    th,
    td {
        padding: 0.5rem !important;
    }

    /* Stats Cards */
    [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Vote Cards */
    [style*="minmax(280px"] {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.mobile-menu-overlay.active {
    display: block;
}

/* Hamburger Animation */
#mobile-menu-toggle.active div:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

#mobile-menu-toggle.active div:nth-child(2) {
    opacity: 0;
}

#mobile-menu-toggle.active div:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}