:root {
    --primary: #00f2ff;
    --primary-glow: rgba(0, 242, 255, 0.3);
    --secondary: #ff8c00;
    --bg-dark: #02060a;
    --card-bg: rgba(5, 15, 25, 0.8);
    --border-color: rgba(0, 242, 255, 0.15);
    --text-main: #b3e5fc;
    --text-muted: #4fc3f7;
    --hud-red: #ff3c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'JetBrains Mono', 'Inter', monospace;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
}

#canvas-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* HUD Overlays */
.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.3;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    position: relative;
    border-radius: 4px;
}

.glass-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--primary-glow);
    pointer-events: none;
    opacity: 0.5;
}

/* Authentication Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    text-align: center;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.input-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    color: white;
    border-radius: 6px;
    outline: none;
    transition: all 0.3s;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn-primary {
    width: 100%;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--primary-glow);
}

.auth-toggle {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-toggle a {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

/* Dashboard Layout */
.dashboard-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 30px;
    padding: 30px;
    height: 100vh;
    width: 100%;
}

/* Granular Menu Toggle */
#nav-links {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
}

#nav-links.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0 !important;
    pointer-events: none;
}

.sidebar {
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (max-width: 1024px) {
    body {
        overflow: hidden !important;
        height: 100dvh !important;
        position: fixed;
        width: 100%;
    }

    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100dvh !important;
        padding: 20px !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    /* Aggressive hiding of non-essential mobile components */
    aside.sidebar,
    .terminal,
    .mobile-chat-bar,
    .sidebar .metric-card {
        display: none !important;
        visibility: hidden !important;
    }

    .main-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-evenly !important;
        /* Balanced spacing */
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .arc-reactor-container {
        width: min(70vw, 300px) !important;
        height: min(70vw, 300px) !important;
        margin: 0 !important;
    }

    .ring-1 {
        width: 90% !important;
        height: 90% !important;
    }

    .ring-2 {
        width: 80% !important;
        height: 80% !important;
    }

    .ring-3 {
        width: 60% !important;
        height: 60% !important;
    }

    .voice-trigger-center {
        width: 40% !important;
        height: 40% !important;
    }

    .logo-container {
        margin: 0 !important;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .logo-container img {
        width: min(80vw, 300px) !important;
        height: auto !important;
    }

    .status-text {
        font-size: 0.9rem !important;
        margin: 0 !important;
        letter-spacing: 2px !important;
    }
}

.mobile-chat-bar {
    display: none;
}

/* Hidden on desktop */

@media (max-width: 480px) {
    .arc-reactor-container {
        width: 200px;
        height: 200px;
    }

    .ring-1 {
        width: 160px;
        height: 160px;
    }

    .ring-2 {
        width: 130px;
        height: 130px;
    }

    .ring-3 {
        width: 100px;
        height: 100px;
    }

    .logo-container img {
        width: 180px !important;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s infinite ease-in-out;
}