:root {
    --bg-color: #05000a;
    --primary-color: #bb77ff;
    --accent-color: #00ffcc;
    --secondary-accent: #a26bff;
    --glass-bg: rgba(20, 0, 40, 0.4);
    --glass-border: rgba(187, 119, 255, 0.3);
    --card-hover-bg: rgba(40, 0, 80, 0.6);
    --font-main: 'Orbitron', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: var(--font-mono);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1a002e 0%, #000000 100%);
}

.content-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
}

header {
    text-align: center;
    padding: 60px 0 40px;
    animation: fadeInDown 1s ease-out;
}

h1 {
    font-family: var(--font-main);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.5), 0 0 40px rgba(0, 255, 204, 0.3);
    letter-spacing: 4px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-family: var(--font-main);
    font-size: 1.5rem;
    color: white;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    box-shadow: 0 0 10px var(--accent-color);
}

.hq-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    perspective: 1000px;
}

.hq-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    text-decoration: none;
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hq-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(162, 107, 255, 0.4), inset 0 0 20px rgba(162, 107, 255, 0.2);
}

.card-content {
    z-index: 2;
}

.hq-number {
    display: block;
    font-family: var(--font-main);
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.4s ease;
}

.hq-card:hover .hq-number {
    color: rgba(0, 255, 204, 0.1);
    transform: translateY(-50%) scale(1.2);
}

.hq-card h3 {
    font-family: var(--font-main);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 8px;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.5);
}

.hq-card p {
    font-size: 0.9rem;
    color: #ddd;
    opacity: 0.8;
}

.card-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.hq-card:hover .card-glow {
    left: 150%;
    transition: 0.7s;
}

footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: auto;
}

/* Glitch Effect for Title */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    5% { clip: rect(80px, 9999px, 90px, 0); }
    10% { clip: rect(10px, 9999px, 40px, 0); }
    15% { clip: rect(50px, 9999px, 20px, 0); }
    20% { clip: rect(20px, 9999px, 60px, 0); }
    25% { clip: rect(90px, 9999px, 30px, 0); }
    30% { clip: rect(60px, 9999px, 10px, 0); }
    35% { clip: rect(10px, 9999px, 80px, 0); }
    40% { clip: rect(40px, 9999px, 50px, 0); }
    45% { clip: rect(70px, 9999px, 20px, 0); }
    50% { clip: rect(20px, 9999px, 70px, 0); }
    55% { clip: rect(50px, 9999px, 90px, 0); }
    60% { clip: rect(80px, 9999px, 10px, 0); }
    65% { clip: rect(10px, 9999px, 60px, 0); }
    70% { clip: rect(60px, 9999px, 30px, 0); }
    75% { clip: rect(30px, 9999px, 80px, 0); }
    80% { clip: rect(90px, 9999px, 10px, 0); }
    85% { clip: rect(10px, 9999px, 50px, 0); }
    90% { clip: rect(50px, 9999px, 20px, 0); }
    95% { clip: rect(20px, 9999px, 90px, 0); }
    100% { clip: rect(80px, 9999px, 40px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(60px, 9999px, 10px, 0); }
    5% { clip: rect(10px, 9999px, 80px, 0); }
    10% { clip: rect(90px, 9999px, 20px, 0); }
    15% { clip: rect(20px, 9999px, 50px, 0); }
    20% { clip: rect(50px, 9999px, 90px, 0); }
    25% { clip: rect(80px, 9999px, 10px, 0); }
    30% { clip: rect(10px, 9999px, 60px, 0); }
    35% { clip: rect(60px, 9999px, 30px, 0); }
    40% { clip: rect(30px, 9999px, 80px, 0); }
    45% { clip: rect(80px, 9999px, 10px, 0); }
    50% { clip: rect(10px, 9999px, 50px, 0); }
    55% { clip: rect(50px, 9999px, 20px, 0); }
    60% { clip: rect(20px, 9999px, 90px, 0); }
    65% { clip: rect(90px, 9999px, 10px, 0); }
    70% { clip: rect(10px, 9999px, 60px, 0); }
    75% { clip: rect(60px, 9999px, 30px, 0); }
    80% { clip: rect(30px, 9999px, 80px, 0); }
    85% { clip: rect(80px, 9999px, 10px, 0); }
    90% { clip: rect(10px, 9999px, 50px, 0); }
    95% { clip: rect(50px, 9999px, 20px, 0); }
    100% { clip: rect(20px, 9999px, 90px, 0); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    header {
        padding: 40px 0 20px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .hq-card {
        padding: 20px;
    }
    
    .hq-number {
        font-size: 2rem;
        right: 15px;
    }
}
