/* ===================================
   HUD ADMIN STYLE - DARK FUTURISTIC THEME
   =================================== */

:root {
    /* Dark Theme Colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2128;
    --bg-card: #21262d;
    
    /* Accent Colors */
    --accent-primary: #00d9ff;
    --accent-secondary: #00ffc8;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    /* Border & Effects */
    --border-color: #30363d;
    --corner-size: 12px;
    --corner-thickness: 2px;
    --glow: 0 0 20px rgba(0, 217, 255, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
body[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #eaeef2;
    --bg-card: #ffffff;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --text-muted: #6e7781;
    --border-color: #d0d7de;
}

/* Color Themes */
body[data-color="cyan"] {
    --accent-primary: #00d9ff;
    --accent-secondary: #00ffc8;
    --glow: 0 0 20px rgba(0, 217, 255, 0.3);
}

body[data-color="blue"] {
    --accent-primary: #0066ff;
    --accent-secondary: #00d9ff;
    --glow: 0 0 20px rgba(0, 102, 255, 0.3);
}

body[data-color="purple"] {
    --accent-primary: #9d4edd;
    --accent-secondary: #c77dff;
    --glow: 0 0 20px rgba(157, 78, 221, 0.3);
}

body[data-color="pink"] {
    --accent-primary: #ff006e;
    --accent-secondary: #ff5d8f;
    --glow: 0 0 20px rgba(255, 0, 110, 0.3);
}

body[data-color="orange"] {
    --accent-primary: #ff9500;
    --accent-secondary: #ffb700;
    --glow: 0 0 20px rgba(255, 149, 0, 0.3);
}

body[data-color="yellow"] {
    --accent-primary: #ffd60a;
    --accent-secondary: #ffe66d;
    --glow: 0 0 20px rgba(255, 214, 10, 0.3);
}

body[data-color="green"] {
    --accent-primary: #00ff88;
    --accent-secondary: #00ffc8;
    --glow: 0 0 20px rgba(0, 255, 136, 0.3);
}

body[data-color="red"] {
    --accent-primary: #ff0054;
    --accent-secondary: #ff5d8f;
    --glow: 0 0 20px rgba(255, 0, 84, 0.3);
}

/* ===================================
   GLOBAL STYLES
   =================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   HEADER
   =================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.user-profile:hover {
    background: var(--bg-card);
    box-shadow: var(--glow);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

.user-name {
    font-size: 14px;
    color: var(--text-primary);
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1002;
}

.user-dropdown.show {
    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;
    transition: var(--transition);
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* ===================================
   SIDEBAR
   =================================== */

.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 260px;
    height: calc(100vh - 60px);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: var(--transition);
    z-index: 999;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
}

.nav-item.active {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-accordion > .nav-item {
    position: relative;
}

.nav-accordion-icon {
    margin-left: auto;
    transition: var(--transition);
}

.nav-accordion.expanded .nav-accordion-icon {
    transform: rotate(180deg);
}

.nav-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-accordion.expanded .nav-accordion-content {
    max-height: none;
}

.nav-accordion-content .nav-item {
    padding-left: 56px;
    font-size: 14px;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.main-content {
    margin-left: 260px;
    margin-top: 60px;
    padding: 30px;
    min-height: calc(100vh - 60px);
    transition: var(--transition);
}

/* ===================================
   HUD CARD WITH CORNER BRACKETS
   =================================== */

.hud-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.hud-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--glow);
}

/* Corner Brackets */
.hud-card::before,
.hud-card::after {
    content: '';
    position: absolute;
    width: var(--corner-size);
    height: var(--corner-size);
    border: var(--corner-thickness) solid var(--accent-primary);
}

.hud-card::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 12px;
}

.hud-card::after {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 12px;
}

.hud-card .corner-bottom-left,
.hud-card .corner-bottom-right {
    position: absolute;
    width: var(--corner-size);
    height: var(--corner-size);
    border: var(--corner-thickness) solid var(--accent-primary);
}

.hud-card .corner-bottom-left {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 12px;
}

.hud-card .corner-bottom-right {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 12px;
}

/* ===================================
   STAT CARDS
   =================================== */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--glow);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
    font-weight: 600;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-change {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-change.positive {
    color: var(--accent-primary);
}

.stat-change.positive i {
    color: var(--accent-primary);
}

.stat-change.negative {
    color: #ff006e;
}

.stat-change.negative i {
    color: #ff006e;
}

/* ===================================
   THEME CUSTOMIZER
   =================================== */

.theme-panel {
    position: fixed;
    top: 60px;
    right: -320px;
    width: 320px;
    height: calc(100vh - 60px);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 1001;
}

.theme-panel.open {
    right: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

.theme-section {
    margin-bottom: 30px;
}

.theme-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.theme-option {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.theme-option:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.theme-option.active {
    border-color: var(--accent-primary);
    background: var(--bg-card);
    color: var(--accent-primary);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--text-primary);
}

.color-option.active::after {
    content: '?';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .user-name {
        display: none;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}