:root {
    --primary-hue: 240;
    /* Blue based */
    --accent-colo: #00f3ff;
    /* Cyan Neon */
    --text-main: #ffffff;
    --text-dim: #8892b0;
    --bg-dark: #0a0e17;
    --panel-bg: rgba(20, 30, 50, 0.7);
    --border-glow: rgba(0, 243, 255, 0.3);

    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* cyber-grid background */
/* Custom Scrollbar to remove empty space */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* cyber-grid background */
.bg-grid {
    position: fixed;
    /* Fixed to prevent scrolling void */
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(1200px) rotateX(60deg) translateY(0);
    animation: gridMove 25s linear infinite;
    z-index: 0;
    pointer-events: none;
    /* Ensure clicks pass through */
}

.bg-glow {
    position: fixed;
    /* Fixed to prevent scrolling void */
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 89, 255, 0.1), transparent 80%);
    z-index: 1;
    pointer-events: none;
}

.system-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 720px;
    /* Increased for better 1080p presence */
    padding: 30px;
    transform-style: preserve-3d;
    /* Enable 3D context for children */
}

/* Glass HUD Panel */
.hud-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    box-shadow:
        0 0 50px rgba(0, 140, 255, 0.15),
        inset 0 0 30px rgba(0, 243, 255, 0.05),
        0 20px 40px rgba(0, 0, 0, 0.6);
    /* Deep shadow for floating effect */
    overflow: hidden;
    position: relative;
    transform: translateZ(20px);
    /* Push forward in 3D space if supported */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hud-panel:hover {
    box-shadow:
        0 0 60px rgba(0, 140, 255, 0.2),
        inset 0 0 30px rgba(0, 243, 255, 0.1),
        0 30px 60px rgba(0, 0, 0, 0.7);
    border-color: rgba(0, 243, 255, 0.5);
}

/* Top Decoration Line */
.hud-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-colo), transparent);
    animation: scanTop 3s ease-in-out infinite;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.status-indicator.live {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: blink 2s infinite;
}

.header-text {
    font-family: var(--font-display);
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--accent-colo);
    font-size: 0.9rem;
}

.version-badge {
    font-size: 0.7rem;
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.content-wrapper {
    padding: 40px 30px;
    text-align: center;
}

/* Visual Core */
.core-visual {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
}

.outer-ring {
    width: 100%;
    height: 100%;
    border-top: 2px solid var(--accent-colo);
    border-bottom: 2px solid var(--accent-colo);
    animation: spin 8s linear infinite;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.inner-ring {
    width: 70%;
    height: 70%;
    border-left: 2px solid #0066ff;
    border-right: 2px solid #0066ff;
    animation: spin 6s linear infinite reverse;
}

.logo-holder {
    width: 60%;
    height: 60%;
    z-index: 5;
    /* Static logo for stability */
}

.system-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

.main-heading {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #b4c6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sub-heading {
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Metrics */
.system-metrics {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.metric-row {
    width: 100%;
    max-width: 400px;
    /* Limit max width specifically */
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-colo);
    font-family: var(--font-display);
    letter-spacing: 1px;
    align-self: flex-start;
    margin-left: 10%;
    /* Visual alignment helper */
}

.metric-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    width: 80%;
    margin: 0 auto;
}

.metric-bar {
    height: 100%;
    background: linear-gradient(90deg, #0066ff, var(--accent-colo));
    border-radius: 3px;
    box-shadow: 0 0 10px var(--accent-colo);
    position: relative;
    transition: width 0.5s ease;
    /* Smooth transition for any JS size changes */
}

.metric-bar.processing {
    background: linear-gradient(90deg, #9d00ff, #ff00ea);
    box-shadow: 0 0 10px #ff00ea;
}

.metric-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s infinite;
}

.metric-value {
    font-size: 0.8rem;
    color: white;
    font-family: var(--font-display);
    align-self: flex-end;
    margin-right: 10%;
    /* Visual alignment helper matches label */
    margin-top: -20px;
    /* Pull up next to bar if needed, or better, remove float logic */
}

.info-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 243, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 243, 255, 0.1);
}

.info-icon {
    color: var(--accent-colo);
}

.info-text {
    font-size: 0.9rem;
    color: #cad1e3;
}

.time-remaining {
    color: white;
    font-weight: 600;
}

.panel-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    font-size: 0.7rem;
    color: #555;
    text-align: center;
    font-family: var(--font-display);
    letter-spacing: 1px;
}

/* Animations */
@keyframes gridMove {
    0% {
        transform: perspective(1000px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(1000px) rotateX(60deg) translateY(50px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes scanTop {

    0%,
    100% {
        opacity: 0;
        width: 0;
        left: 50%;
    }

    50% {
        opacity: 1;
        width: 100%;
        left: 0;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .core-visual {
        width: 120px;
        height: 120px;
    }

    .main-heading {
        font-size: 1.6rem;
    }

    .hud-panel {
        width: 95%;
    }
}