:root {
    --bg-dark: #05070a;
    --card-bg: rgba(15, 20, 30, 0.7);
    --accent-blue: #00f2ff;
    --accent-purple: #bc13fe;
    --accent-cyan: #00ffcc;
    --accent-red: #ff3e3e;
    --accent-green: #39ff14;
    --text-primary: #e0e6ed;
    --text-secondary: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.05);
    --glow-blue: 0 0 20px rgba(0, 242, 255, 0.3);
    --glow-purple: 0 0 20px rgba(188, 19, 254, 0.3);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: radial-gradient(circle at 50% 50%, #1a1f35 0%, #05070a 100%);
}

/* Background Image Integration */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('futuristic_server_background.png');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
    filter: blur(2px);
}

.scanline {
    width: 100%;
    height: 100px;
    z-index: 10;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { bottom: 100%; }
    100% { bottom: -100px; }
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Header Styles */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    color: var(--accent-blue);
    filter: drop-shadow(var(--glow-blue));
}

.glitch-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    position: relative;
    text-transform: uppercase;
}

.system-badge {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Status Overview Grid */
.status-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.status-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.card-header h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.glow-blue { border-bottom: 3px solid var(--accent-blue); }
.glow-purple { border-bottom: 3px solid var(--accent-purple); }
.glow-cyan { border-bottom: 3px solid var(--accent-cyan); }

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
}

.metric-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-info h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

/* Gauge Styles */
.gauge-container {
    width: 100px;
    height: 100px;
    position: relative;
}

.gauge {
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.gauge-progress {
    fill: none;
    stroke: var(--accent-blue);
    stroke-width: 8;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

/* Progress Bar Styles */
.progress-container {
    width: 100%;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.progress-bar-wrapper {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.5);
}

/* Caching Section */
.caching-section {
    background: linear-gradient(135deg, rgba(15, 20, 30, 0.8) 0%, rgba(10, 10, 20, 0.9) 100%);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.badge {
    background: var(--accent-purple);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

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

.cache-stat {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-purple);
}

.cache-stat label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.cache-value {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.color-green { color: var(--accent-green); }
.color-red { color: var(--accent-red); }

.cache-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Terminal Styles */
.terminal-container {
    background: #0d1117;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #30363d;
}

.terminal-header {
    background: #161b22;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #8b949e;
}

.terminal-controls {
    display: flex;
    gap: 6px;
}

.terminal-controls span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #30363d;
}

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #c9d1d9;
    min-height: 150px;
    max-height: 200px;
    overflow-y: auto;
}

.log-entry {
    margin-bottom: 5px;
    opacity: 0.8;
}

.log-entry::before {
    content: "> ";
    color: var(--accent-cyan);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .cache-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}
