:root {
    --bg-dark: #050510;
    --bg-panel: rgba(20, 20, 35, 0.7);
    --border-neon: #00f3ff;
    --text-neon: #00f3ff;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --accent-gold: #ffd700;
    --alert-red: #ff3333;
    --success-green: #33ff33;

    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;

    --glass-blur: blur(12px);
    --grid-gap: 20px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(0, 243, 255, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 215, 0, 0.05), transparent 25%);
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(0, 243, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.text-neon {
    color: var(--text-neon);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.text-gold {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.text-red {
    color: var(--alert-red);
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 80px 1fr;
    height: 100vh;
    padding: var(--grid-gap);
    gap: var(--grid-gap);
}

/* Header */
.top-bar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background: var(--bg-panel);
    border: 1px solid rgba(0, 243, 255, 0.2);
    backdrop-filter: var(--glass-blur);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.brand {
    font-size: 1.8rem;
    font-weight: 700;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: var(--success-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success-green);
    animation: pulse 2s infinite;
}

/* Sidebar */
.sidebar {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    backdrop-filter: var(--glass-blur);
    position: relative;
    overflow: hidden;
}

.nav-item {
    padding: 0.8rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-display);
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.nav-icon {
    font-size: 1.1rem;
    opacity: 0.7;
    width: 20px;
    text-align: center;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    opacity: 1;
    color: var(--text-neon);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--text-neon);
    color: var(--text-neon);
    transform: translateX(5px);
}

/* Main Main */
.main-view {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow-y: auto;
    padding-right: 10px;
    display: grid;
    gap: 2rem;
}

section {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Cards (The Bridge) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-panel);
    border: 1px solid rgba(0, 243, 255, 0.1);
    padding: 1.5rem;
    border-radius: 6px;
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--text-neon);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.card h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card .value {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Product Armory */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 215, 0, 0.2);
    /* Gold border for products */
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    opacity: 0.8;
}

.product-content {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--text-neon);
    color: var(--text-neon);
    text-transform: uppercase;
    font-family: var(--font-display);
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    margin-top: 1rem;
}

.btn:hover {
    background: var(--text-neon);
    color: #000;
    box-shadow: 0 0 15px var(--text-neon);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Progress Bar Polish */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar .fill {
    height: 100%;
    background: var(--text-neon);
    box-shadow: 0 0 10px var(--text-neon);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Data Stream Effect */
.sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--text-neon), transparent);
    animation: dataStream 3s linear infinite;
    opacity: 0.3;
}

@keyframes dataStream {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-500px);
        opacity: 0;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-neon);
}