@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    --bg-light: #e5e7eb;
    --hud-cyan: #00f3ff;
    --hud-cyan-deep: #0891b2;
    --hud-emerald: #10b981;
    --hud-purple: #10b981;
    --hud-amber: #0891b2;
    --card-dark: #060f1e;
    --text-strong: #0f172a;
    --text-dim: #475569;
}



body {
    background-color: var(--bg-light);
    color: var(--text-strong);
    
    
    justify-content: center;
    align-items: center;
    
    
    position: relative;
}

/* Animated Ambient Background Grid */
#cyber-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Soft light vignette for depth */
.vignette-overlay {
    position: fixed;
    inset: 0;
    background1: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.55) 0%, transparent 55%, rgba(148, 163, 184, 0.35) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Main Page Wrapper */
.hud-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}

/* Left side: text only, no box */
.hud-info {
    padding: 8px 24px 8px 8px;
}

/* HUD corner accents (used on cards) */
.hud-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--accent);
    border-style: solid;
    pointer-events: none;
    z-index: 3;
}
.hud-corner-tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.hud-corner-br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

/* Status badge */
.hud-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(8, 145, 178, 0.1);
    border: 1px solid rgba(8, 145, 178, 0.45);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--hud-cyan-deep);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    font-weight: 700; 
}

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

@keyframes pulse-glow {
    0%   { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 1;   transform: scale(1.2); }
}

.hud-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-strong);
    letter-spacing: 0.5px;
    line-height: 1.25;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hud-title span {
    color: var(--hud-cyan-deep);
}

.hud-text {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-dim);
    margin-bottom: 20px;
    text-align: justify;
}

/* Right side 2x2 grid */
.hud-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Per-card accent colors */
.accent-cyan    { --accent: #00f3ff; --accent-rgb: 0, 243, 255; }
.accent-purple  { --accent: #34d399; --accent-rgb: 16, 185, 129; }
.accent-emerald { --accent: #34d399; --accent-rgb: 16, 185, 129; }
.accent-amber   { --accent: #00f3ff; --accent-rgb: 0, 243, 255; }

/* Cyber card: dark glass + rotating gradient border */
.cyber-card {
    --mx: 50%;
    --my: 50%;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 175px;
    padding: 36px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    border-radius: 12px;
    border: 1.5px solid transparent;
    background:
        linear-gradient(var(--card-dark), var(--card-dark)) padding-box,
        conic-gradient(from var(--angle), rgba(var(--accent-rgb), 0.08), var(--accent), rgba(var(--accent-rgb), 0.08) 40%, rgba(var(--accent-rgb), 0.08)) border-box;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.25), 0 2px 6px rgba(15, 23, 42, 0.15);
    animation: spin-border 6s linear infinite;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

@keyframes spin-border {
    to { --angle: 360deg; }
}

.cyber-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 40px rgba(var(--accent-rgb), 0.35), 0 4px 10px rgba(15, 23, 42, 0.2);
}

/* Background effect layers */
.card-fx {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    border-radius: inherit;
}
.card-fx span {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* 1. Drifting aurora glow */
.fx-aurora {
    inset: -40% !important;
    background:
        radial-gradient(circle at 25% 30%, rgba(var(--accent-rgb), 0.45), transparent 40%),
        radial-gradient(circle at 75% 70%, rgba(var(--accent-rgb), 0.28), transparent 45%),
        radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.22), transparent 35%);
    filter: blur(18px);
    animation: aurora-drift 9s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
    0%   { transform: translate(-6%, -4%) rotate(0deg) scale(1); }
    50%  { transform: translate(5%, 6%) rotate(12deg) scale(1.12); }
    100% { transform: translate(-3%, 4%) rotate(-8deg) scale(1.05); }
}

/* 2. Tech grid fading toward the edges */
.fx-grid {
    background-image:
        linear-gradient(rgba(var(--accent-rgb), 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), 0.18) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 75%);
            mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 75%);
    animation: grid-pan 8s linear infinite;
}
@keyframes grid-pan {
    to { background-position: 22px 22px; }
}

/* 3. Moving scanline */
.fx-scan {
    background: linear-gradient(180deg, transparent 0%, rgba(var(--accent-rgb), 0.22) 50%, transparent 100%);
    height: 40% !important;
    bottom: auto !important;
    transform: translateY(-120%);
    animation: scan-down 4.5s ease-in-out infinite;
}
@keyframes scan-down {
    0%   { transform: translateY(-120%); }
    100% { transform: translateY(300%); }
}

/* 4. Cursor-following spotlight */
.fx-spot {
    background: radial-gradient(180px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.35), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cyber-card:hover .fx-spot { opacity: 1; }

.card-icon-box {
    width: 58px;
    height: 58px;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.cyber-card:hover .card-icon-box {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.55);
    transform: scale(1.1);
}

.card-icon-box i {
    font-size: 1.5rem;
    color: var(--accent);
    transition: all 0.3s ease;
}

.cyber-card:hover .card-icon-box i {
    color: #ffffff;
    text-shadow: 0 0 10px var(--accent);
}

.card-label {
    position: relative;
    z-index: 2;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.8px;
    line-height: 1.4;
    text-transform: uppercase;
}

.cyber-card:hover .card-label {
    color: var(--accent);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cyber-card, .fx-aurora, .fx-grid, .fx-scan, .status-pulse {
        animation: none;
    }
}

/* Responsive Breakpoints */
@media screen and (max-width: 1024px) {
    .hud-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .hud-info { padding: 0; }
}

@media screen and (max-width: 500px) {
    .hud-grid { grid-template-columns: 1fr; }
    body { padding: 20px 12px; }
    .hud-title { font-size: 1.5rem; }
}
