/**
 * HACKERQUEST - Custom Game CSS
 * Hacker-Terminal Design mit Neon-Glow-Effekten
 */

/* ============================================================
   CSS Variables
   ============================================================ */
:root {
    --hq-bg-dark: #0a0e17;
    --hq-bg-card: #0d1117;
    --hq-bg-terminal: #0c1015;
    --hq-border: #1a2332;
    --hq-border-glow: #00ff4133;
    --hq-accent: #00ff41;
    --hq-accent-dim: #00cc33;
    --hq-accent-glow: 0 0 10px #00ff4155, 0 0 20px #00ff4122;
    --hq-cyan: #00d4ff;
    --hq-red: #ff3333;
    --hq-yellow: #ffcc00;
    --hq-purple: #b44aff;
    --hq-font-mono: 'Courier New', 'Fira Code', 'Consolas', monospace;
    --hq-font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --hq-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hq-terminal-box.web-release {
    border: 2px solid rgba(0, 255, 65, 0.65) !important;
    box-shadow: 0 0 0 0.15rem rgba(0, 255, 65, 0.25) !important;
}

.hq-terminal-box.desktop-release {
    border: 2px solid rgba(255, 68, 68, 0.75) !important;
    box-shadow: 0 0 0 0.15rem rgba(255, 68, 68, 0.25) !important;
    background: rgba(84, 17, 17, 0.08) !important;
}

/* ============================================================
   Global Styles
   ============================================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--hq-accent-dim) var(--hq-bg-dark);
}

*::-webkit-scrollbar {
    width: 6px;
}
*::-webkit-scrollbar-track {
    background: var(--hq-bg-dark);
}
*::-webkit-scrollbar-thumb {
    background: var(--hq-accent-dim);
    border-radius: 3px;
}

body {
    background-color: var(--hq-bg-dark);
    color: #c9d1d9;
    font-family: var(--hq-font-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

a {
    color: var(--hq-accent);
    transition: var(--hq-transition);
}
a:hover {
    color: var(--hq-cyan);
    text-shadow: var(--hq-accent-glow);
}

::selection {
    background: var(--hq-accent);
    color: var(--hq-bg-dark);
}

code {
    color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--hq-font-mono);
}

.text-accent {
    color: var(--hq-accent) !important;
}

.bg-accent {
    background-color: var(--hq-accent) !important;
    color: var(--hq-bg-dark) !important;
    font-weight: 700;
}

.text-bronze {
    color: #cd7f32 !important;
}

.font-monospace {
    font-family: var(--hq-font-mono) !important;
}

/* ============================================================
   Matrix Rain Background
   ============================================================ */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.08;
    pointer-events: none;
}

/* ============================================================
   Scanline Overlay
   ============================================================ */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.015) 2px,
        rgba(0, 255, 65, 0.015) 4px
    );
}

/* ============================================================
   Navbar
   ============================================================ */
.hq-navbar {
    background: rgba(10, 14, 23, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hq-border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    z-index: 1030;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.hq-navbar.hq-autohide {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.hq-brand {
    font-family: var(--hq-font-mono);
    font-weight: 900;
    font-size: 1.3rem;
    color: var(--hq-accent) !important;
    text-shadow: var(--hq-accent-glow);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hq-brand .brand-text {
    color: #ffffff;
}

.hq-brand:hover {
    text-shadow: 0 0 15px var(--hq-accent), 0 0 30px var(--hq-accent);
}

.hq-navbar .nav-link {
    color: #8b949e;
    font-family: var(--hq-font-mono);
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    transition: var(--hq-transition);
    border-radius: 4px;
}

.hq-navbar .nav-link:hover {
    color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.1);
}

.hq-online-badge {
    font-family: var(--hq-font-mono);
    font-size: 0.8rem;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hq-player-badge {
    font-family: var(--hq-font-mono);
    font-size: 0.85rem;
    color: var(--hq-accent);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hq-btn-nav {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: var(--hq-font-mono);
    transition: all 0.2s ease;
}
.hq-btn-nav:hover {
    transform: scale(1.1);
}

/* Discord Button - Custom Styling */
.hq-btn-discord {
    border: 1px solid #5865f2 !important;
    color: #5865f2 !important;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.hq-btn-discord::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.3), transparent);
    transition: left 0.4s ease;
    z-index: 0;
}

.hq-btn-discord:hover {
    color: #fff !important;
    border-color: #5865f2 !important;
    background: rgba(88, 101, 242, 0.15) !important;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.5), 
                inset 0 0 10px rgba(88, 101, 242, 0.2);
    text-shadow: 0 0 8px rgba(88, 101, 242, 0.8);
}

.hq-btn-discord:hover::before {
    left: 100%;
}

.hq-btn-discord i {
    font-size: 1rem;
}

/* ============================================================
   Maintenance Mode
   ============================================================ */
.hq-maintenance .terminal-header {
    border-bottom-color: rgba(220, 53, 69, 0.4);
}

.hq-maintenance .terminal-title {
    color: #dc3545;
}

/* Fake Input - looks like real input but is a div, can't be unlocked via dev tools */
.hq-fake-input {
    color: #dc3545 !important;
    opacity: 0.6;
    cursor: not-allowed;
    user-select: none;
    -webkit-user-select: none;
    background: rgba(220, 53, 69, 0.05) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
    font-style: italic;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.hq-input-locked .input-group-text {
    border-color: rgba(220, 53, 69, 0.3) !important;
}

/* Maintenance Button: Glitch + Color flicker */
.hq-btn-maintenance {
    font-family: var(--hq-font-mono);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid;
    border-radius: 6px;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
    animation: maintenanceFlicker 4s ease-in-out infinite;
    transition: none;
}

@keyframes maintenanceFlicker {
    0%, 100% {
        background: rgba(0, 200, 83, 0.15);
        border-color: rgba(0, 200, 83, 0.6);
        color: #00c853;
        box-shadow: 0 0 10px rgba(0, 200, 83, 0.2);
    }
    8% {
        background: rgba(0, 200, 83, 0.15);
        border-color: rgba(0, 200, 83, 0.6);
        color: #00c853;
    }
    10% {
        background: rgba(220, 53, 69, 0.15);
        border-color: rgba(220, 53, 69, 0.6);
        color: #dc3545;
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.2);
    }
    48% {
        background: rgba(220, 53, 69, 0.15);
        border-color: rgba(220, 53, 69, 0.6);
        color: #dc3545;
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.2);
    }
    50% {
        background: rgba(0, 200, 83, 0.15);
        border-color: rgba(0, 200, 83, 0.6);
        color: #00c853;
        box-shadow: 0 0 10px rgba(0, 200, 83, 0.2);
    }
    58% {
        background: rgba(0, 200, 83, 0.15);
        border-color: rgba(0, 200, 83, 0.6);
        color: #00c853;
    }
    60% {
        background: rgba(220, 53, 69, 0.15);
        border-color: rgba(220, 53, 69, 0.6);
        color: #dc3545;
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.2);
    }
}

/* Glitch effect inside maintenance button text */
.glitch-btn {
    position: relative;
    display: inline-block;
}

.glitch-btn::before,
.glitch-btn::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glitch-btn::before {
    left: 2px;
    text-shadow: -2px 0 #dc3545;
    animation: glitchBtn1 2.5s infinite linear alternate-reverse;
    clip-path: inset(0 0 65% 0);
}

.glitch-btn::after {
    left: -2px;
    text-shadow: 2px 0 #00c853;
    animation: glitchBtn2 2.5s infinite linear alternate-reverse;
    clip-path: inset(35% 0 0 0);
}

@keyframes glitchBtn1 {
    0%   { clip-path: inset(0 0 85% 0); transform: translate(0); }
    5%   { clip-path: inset(15% 0 60% 0); transform: translate(-3px, 1px); }
    10%  { clip-path: inset(55% 0 10% 0); transform: translate(2px, -1px); }
    15%  { clip-path: inset(0 0 100% 0); transform: translate(0); }
    20%  { clip-path: inset(25% 0 45% 0); transform: translate(3px, 0); }
    25%  { clip-path: inset(70% 0 5% 0); transform: translate(-2px, 1px); }
    30%  { clip-path: inset(0 0 100% 0); transform: translate(0); }
    50%  { clip-path: inset(10% 0 70% 0); transform: translate(2px, -1px); }
    55%  { clip-path: inset(40% 0 35% 0); transform: translate(-3px, 0); }
    60%  { clip-path: inset(0 0 100% 0); transform: translate(0); }
    80%  { clip-path: inset(80% 0 0% 0); transform: translate(1px, 1px); }
    85%  { clip-path: inset(5% 0 85% 0); transform: translate(-1px, 0); }
    90%  { clip-path: inset(0 0 100% 0); transform: translate(0); }
    100% { clip-path: inset(50% 0 25% 0); transform: translate(2px, -1px); }
}

@keyframes glitchBtn2 {
    0%   { clip-path: inset(85% 0 0 0); transform: translate(0); }
    5%   { clip-path: inset(60% 0 15% 0); transform: translate(3px, -1px); }
    10%  { clip-path: inset(10% 0 55% 0); transform: translate(-2px, 1px); }
    15%  { clip-path: inset(100% 0 0 0); transform: translate(0); }
    20%  { clip-path: inset(45% 0 25% 0); transform: translate(-3px, 0); }
    25%  { clip-path: inset(5% 0 70% 0); transform: translate(2px, -1px); }
    30%  { clip-path: inset(100% 0 0 0); transform: translate(0); }
    50%  { clip-path: inset(70% 0 10% 0); transform: translate(-2px, 1px); }
    55%  { clip-path: inset(35% 0 40% 0); transform: translate(3px, 0); }
    60%  { clip-path: inset(100% 0 0 0); transform: translate(0); }
    80%  { clip-path: inset(0% 0 80% 0); transform: translate(-1px, -1px); }
    85%  { clip-path: inset(85% 0 5% 0); transform: translate(1px, 0); }
    90%  { clip-path: inset(100% 0 0 0); transform: translate(0); }
    100% { clip-path: inset(25% 0 50% 0); transform: translate(-2px, 1px); }
}

/* ============================================================
   Blink Animation
   ============================================================ */
.blink {
    animation: blink 1.5s ease-in-out infinite;
    font-size: 0.6rem;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================================
   Main Content
   ============================================================ */
.hq-main {
    padding-bottom: 80px;
    min-height: calc(100vh - 60px);
}

/* ============================================================
   Terminal Box (Kernkomponente)
   ============================================================ */
.hq-terminal-box {
    background: var(--hq-bg-terminal);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--hq-transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hq-terminal-box:hover {
    border-color: var(--hq-border-glow);
    box-shadow: 0 4px 30px rgba(0, 255, 65, 0.1);
}

.hq-terminal-box.mini {
    font-size: 0.9rem;
}

.terminal-header {
    background: linear-gradient(135deg, #1a1e2e, #161b22);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--hq-border);
    user-select: none;
}

.page-changelog .terminal-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-changelog .terminal-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    font-family: var(--hq-font-mono);
    font-size: 0.75rem;
    color: #8b949e;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.terminal-body {
    padding: 16px;
    font-family: var(--hq-font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

.page-changelog .terminal-body {
    padding: 0 16px 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.35s ease, opacity 0.35s ease, transform 0.35s ease, padding 0.35s ease;
}

.page-changelog .terminal-body.expanded {
    padding: 16px;
    max-height: 3000px;
    opacity: 1;
    transform: translateY(0);
}

.page-changelog .hq-changelog-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    white-space: nowrap;
}

.page-changelog .hq-changelog-toggle-btn i {
    transition: transform 0.25s ease;
}

.page-changelog .hq-changelog-toggle-btn[aria-expanded="true"] i {
    transform: rotate(-180deg);
}

.terminal-line {
    font-family: var(--hq-font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: #8b949e;
    word-break: break-word;
}

code {
    word-break: break-all;
}

/* ============================================================
   Login Page
   ============================================================ */
.hq-login-wrapper {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hq-logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border: 2px solid var(--hq-accent);
    border-radius: 50%;
    box-shadow: var(--hq-accent-glow), inset 0 0 20px rgba(0, 255, 65, 0.1);
    animation: logoPulse 3s ease-in-out infinite;
}

.hq-logo-icon {
    font-size: 2.5rem;
    color: var(--hq-accent);
    text-shadow: var(--hq-accent-glow);
}

@keyframes logoPulse {
    0%, 100% { box-shadow: var(--hq-accent-glow); }
    50% { box-shadow: 0 0 20px var(--hq-accent), 0 0 40px rgba(0, 255, 65, 0.3); }
}

.hq-title {
    font-family: var(--hq-font-mono);
    font-weight: 900;
    font-size: 2.5rem;
    letter-spacing: 3px;
    color: #ffffff;
}

.hq-subtitle {
    font-family: var(--hq-font-mono);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--hq-red);
    animation: glitch1 2s infinite linear alternate-reverse;
    clip-path: inset(0 0 65% 0);
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--hq-cyan);
    animation: glitch2 2s infinite linear alternate-reverse;
    clip-path: inset(35% 0 0 0);
}

@keyframes glitch1 {
    0% { clip-path: inset(0 0 85% 0); }
    10% { clip-path: inset(15% 0 60% 0); }
    20% { clip-path: inset(55% 0 10% 0); }
    30% { clip-path: inset(25% 0 45% 0); }
    40% { clip-path: inset(70% 0 5% 0); }
    50% { clip-path: inset(10% 0 70% 0); }
    60% { clip-path: inset(40% 0 35% 0); }
    70% { clip-path: inset(80% 0 0% 0); }
    80% { clip-path: inset(5% 0 85% 0); }
    90% { clip-path: inset(50% 0 25% 0); }
    100% { clip-path: inset(0 0 85% 0); }
}

@keyframes glitch2 {
    0% { clip-path: inset(85% 0 0 0); }
    10% { clip-path: inset(60% 0 15% 0); }
    20% { clip-path: inset(10% 0 55% 0); }
    30% { clip-path: inset(45% 0 25% 0); }
    40% { clip-path: inset(5% 0 70% 0); }
    50% { clip-path: inset(70% 0 10% 0); }
    60% { clip-path: inset(35% 0 40% 0); }
    70% { clip-path: inset(0% 0 80% 0); }
    80% { clip-path: inset(85% 0 5% 0); }
    90% { clip-path: inset(25% 0 50% 0); }
    100% { clip-path: inset(85% 0 0 0); }
}

/* ============================================================
   Inputs & Buttons
   ============================================================ */
.hq-input {
    background: var(--hq-bg-dark) !important;
    border: 1px solid var(--hq-border) !important;
    color: var(--hq-accent) !important;
    font-family: var(--hq-font-mono);
    font-size: 1rem;
    transition: var(--hq-transition);
}

.hq-input:focus {
    border-color: var(--hq-accent) !important;
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.15) !important;
    outline: none;
}

.hq-input::placeholder {
    color: #484f58;
    font-style: italic;
}

.hq-input-group .input-group-text {
    background: var(--hq-bg-dark);
    border: 1px solid var(--hq-border);
    color: var(--hq-accent);
}

.hq-btn-primary {
    background: linear-gradient(135deg, var(--hq-accent-dim), var(--hq-accent));
    color: var(--hq-bg-dark) !important;
    border: none;
    font-family: var(--hq-font-mono);
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.6rem 1.2rem;
    transition: var(--hq-transition);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hq-btn-primary:hover {
    background: var(--hq-accent);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    transform: translateY(-1px);
    color: var(--hq-bg-dark) !important;
}

.hq-btn-primary:active {
    transform: translateY(0);
}

.hq-btn-outline {
    background: transparent;
    border: 1px solid var(--hq-accent);
    color: var(--hq-accent);
    font-family: var(--hq-font-mono);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: var(--hq-transition);
}

.hq-btn-outline:hover {
    background: rgba(0, 255, 65, 0.1);
    color: var(--hq-accent);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

/* ============================================================
   Alert Boxes
   ============================================================ */
.alert-hq {
    font-family: var(--hq-font-mono);
    font-size: 0.85rem;
    border: none;
    border-left: 3px solid;
    border-radius: 4px;
}

.alert-hq.alert-danger {
    background: rgba(255, 51, 51, 0.1);
    border-color: var(--hq-red);
    color: #ff6666;
}

.alert-hq.alert-success {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--hq-accent);
    color: var(--hq-accent);
}

.alert-hq.alert-warning {
    background: rgba(255, 204, 0, 0.1);
    border-color: var(--hq-yellow);
    color: var(--hq-yellow);
}

.alert-hq.alert-info {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--hq-cyan);
    color: var(--hq-cyan);
}

/* ============================================================
   Stat Cards
   ============================================================ */
.hq-stat-card {
    background: var(--hq-bg-card);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 1rem;
    transition: var(--hq-transition);
}

.hq-stat-card:hover {
    border-color: var(--hq-accent);
    box-shadow: var(--hq-accent-glow);
}

.hq-stat-value {
    font-family: var(--hq-font-mono);
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.2;
}

.hq-stat-label {
    font-size: 0.75rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* ============================================================
   Feature Cards (Landing)
   ============================================================ */
.hq-feature-card {
    background: var(--hq-bg-card);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: var(--hq-transition);
}

.hq-feature-card:hover {
    border-color: var(--hq-accent);
    transform: translateY(-3px);
    box-shadow: var(--hq-accent-glow);
}

.hq-feature-card h6 {
    color: #ffffff;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

/* ============================================================
   Online Player Row (Landing)
   ============================================================ */
.online-player-row {
    border-bottom: 1px solid var(--hq-border);
    transition: var(--hq-transition);
}
.online-player-row:last-child {
    border-bottom: none;
}
.online-player-row:hover {
    background: rgba(0, 255, 65, 0.05);
}

/* ============================================================
   Level Cards (Game Dashboard)
   ============================================================ */
.hq-level-card {
    background: var(--hq-bg-card);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: var(--hq-transition);
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.hq-level-card .level-number {
    position: absolute;
    top: 4px;
    right: 8px;
    font-family: var(--hq-font-mono);
    font-size: 0.7rem;
    color: #484f58;
    font-weight: 700;
}

.hq-level-card .level-icon {
    font-size: 1.5rem;
    color: #8b949e;
    margin-bottom: 0.25rem;
}

.hq-level-card .level-title {
    font-family: var(--hq-font-mono);
    font-size: 0.75rem;
    color: #c9d1d9;
    font-weight: 600;
}

.hq-level-card .level-time {
    font-family: var(--hq-font-mono);
    font-size: 0.65rem;
    color: var(--hq-accent);
}

.hq-level-card .level-difficulty {
    font-size: 0.5rem;
}

/* Level Card States */
.hq-level-card.completed {
    border-color: rgba(0, 255, 65, 0.3);
    background: linear-gradient(135deg, var(--hq-bg-card), rgba(0, 255, 65, 0.05));
}
.hq-level-card.completed .level-icon {
    color: var(--hq-accent);
}
.hq-level-card.completed:hover {
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
}

.hq-level-card.current {
    border-color: var(--hq-accent);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    animation: currentLevelPulse 2s ease-in-out infinite;
}
.hq-level-card.current .level-icon {
    color: var(--hq-accent);
}

@keyframes currentLevelPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 65, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 65, 0.4); }
}

.hq-level-card.locked {
    opacity: 0.4;
    cursor: not-allowed !important;
}
.hq-level-card.locked .level-icon {
    color: #484f58;
}

/* ============================================================
   Progress Bar
   ============================================================ */
.hq-progress-container {
    background: var(--hq-bg-card);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 1rem;
}

.hq-progress {
    height: 8px;
    background: var(--hq-bg-dark);
    border-radius: 4px;
    overflow: hidden;
}

.hq-progress-bar {
    background: linear-gradient(90deg, var(--hq-accent-dim), var(--hq-accent), var(--hq-cyan));
    border-radius: 4px;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px var(--hq-accent);
}

/* ============================================================
   Tables
   ============================================================ */
.hq-table {
    margin: 0;
    font-family: var(--hq-font-mono);
    font-size: 0.85rem;
}

.hq-table thead th {
    background: rgba(26, 35, 50, 0.5);
    border-bottom: 1px solid var(--hq-border);
    color: var(--hq-accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding: 8px 12px;
}

.hq-table tbody td {
    border-color: var(--hq-border);
    padding: 8px 12px;
    vertical-align: middle;
}

.hq-table tbody tr:hover {
    background: rgba(0, 255, 65, 0.05) !important;
}

.rank-gold { background: rgba(255, 204, 0, 0.08) !important; }
.rank-silver { background: rgba(192, 192, 192, 0.05) !important; }
.rank-bronze { background: rgba(205, 127, 50, 0.05) !important; }

/* ============================================================
   Level Page
   ============================================================ */
.hq-level-header {
    background: var(--hq-bg-card);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 1.25rem;
}

.hq-level-badge {
    background: var(--hq-accent);
    color: var(--hq-bg-dark);
    font-family: var(--hq-font-mono);
    font-weight: 900;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 2px;
}

.hq-level-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #c9d1d9;
    font-family: var(--hq-font-main);
}

.hq-level-description strong {
    color: var(--hq-accent);
}

/* Challenge areas */
.hq-challenge-area {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 2rem;
}

.hq-url-display {
    background: rgba(26, 35, 50, 0.5);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--hq-border);
}

.hq-code-block {
    background: var(--hq-bg-dark);
    border: 1px solid var(--hq-border);
    border-radius: 6px;
    padding: 1rem;
    font-family: var(--hq-font-mono);
    color: var(--hq-accent);
    word-break: break-all;
    text-align: center;
}

.hq-encrypted-display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.hq-color-block {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    border: 1px solid var(--hq-border);
}

.hq-color-block small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.55rem;
}

.hq-flash-code {
    background: var(--hq-bg-dark);
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 2px solid var(--hq-accent);
    display: inline-block;
    min-width: 200px;
    transition: none;
}

.hq-multi-part {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

/* Fake Console */
.fake-console {
    background: #1a1a2e;
    border: 1px solid var(--hq-border);
    border-radius: 6px;
    padding: 12px;
    font-family: var(--hq-font-mono);
    font-size: 0.8rem;
}

.fake-console .console-line {
    padding: 2px 0;
    color: #8b949e;
    line-height: 1.6;
}

/* Answer Section */
.hq-answer-section {
    padding-top: 1rem;
}

.hq-divider {
    border-color: var(--hq-border);
    opacity: 0.3;
}

/* Timer */
.hq-timer {
    text-shadow: var(--hq-accent-glow);
    letter-spacing: 3px;
}

/* Hint */
.hq-hint-content {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Level Navigation Buttons */
.hq-level-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--hq-font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--hq-border);
    background: var(--hq-bg-dark);
    color: #8b949e;
    border-radius: 4px;
    transition: var(--hq-transition);
    text-decoration: none;
}

.hq-level-btn.completed {
    border-color: var(--hq-accent);
    color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.1);
}

.hq-level-btn.active {
    border-color: var(--hq-accent);
    background: var(--hq-accent);
    color: var(--hq-bg-dark);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.hq-level-btn.available {
    border-color: var(--hq-cyan);
    color: var(--hq-cyan);
}

.hq-level-btn.locked {
    opacity: 0.3;
    cursor: not-allowed;
}

.hq-level-btn:hover:not(.locked) {
    transform: scale(1.1);
}

/* ============================================================
   Online Sidebar
   ============================================================ */
.hq-online-sidebar {
    position: fixed;
    right: -300px;
    top: 60px;
    width: 280px;
    height: calc(100vh - 120px);
    background: var(--hq-bg-terminal);
    border-left: 1px solid var(--hq-border);
    border-bottom: 1px solid var(--hq-border);
    border-radius: 0 0 0 8px;
    z-index: 1020;
    transition: right 0.3s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hq-online-sidebar.open {
    right: 0;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.hq-online-header {
    background: linear-gradient(135deg, #1a1e2e, #161b22);
    padding: 10px 14px;
    font-family: var(--hq-font-mono);
    font-size: 0.8rem;
    color: var(--hq-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--hq-border);
    user-select: none;
}

.sidebar-toggle-icon {
    margin-left: auto;
    transition: transform 0.3s;
}

.hq-online-sidebar.open .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.hq-online-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.hq-online-item {
    background: transparent !important;
    border-color: var(--hq-border) !important;
    color: #c9d1d9;
    font-family: var(--hq-font-mono);
    font-size: 0.8rem;
    padding: 8px 10px !important;
    transition: var(--hq-transition);
}

.hq-online-item:hover {
    background: rgba(0, 255, 65, 0.05) !important;
}

/* ============================================================
   Footer
   ============================================================ */
.hq-footer {
    background: rgba(10, 14, 23, 0.95);
    border-top: 1px solid var(--hq-border);
    padding: 1rem 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    font-family: var(--hq-font-mono);
    font-size: 0.75rem;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.hq-footer.hq-autohide {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

body.hq-ui-hidden main {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
body.hq-ui-hidden .container,
body.hq-ui-hidden .container-fluid {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.hq-online-sidebar {
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.hq-online-sidebar.hq-autohide {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   Leaderboard Rankings
   ============================================================ */
.rank-gold td:first-child,
.rank-silver td:first-child,
.rank-bronze td:first-child {
    font-weight: 700;
}

/* ============================================================
   Leaderboard Tabs
   ============================================================ */
.lb-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lb-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    bottom: -2px;
}

.lb-tab-btn:hover {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.lb-tab-btn.active {
    color: var(--hq-accent);
    border-bottom-color: var(--hq-accent);
    text-shadow: 0 0 10px rgba(0,255,65,0.3);
}

.lb-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

.lb-tab-btn.active .lb-tab-badge {
    background: rgba(0,255,65,0.15);
    color: var(--hq-accent);
}

.lb-sort-select {
    width: auto;
    display: inline-block;
    font-size: 0.8rem;
    padding: 4px 28px 4px 8px;
    font-family: 'Courier New', monospace;
}

/* ============================================================
   Morse Display
   ============================================================ */
.hq-morse-display {
    letter-spacing: 4px;
    line-height: 2;
    color: var(--hq-accent);
    text-shadow: var(--hq-accent-glow);
}

/* ============================================================
   Pseudo Target (Level 17)
   ============================================================ */
.hq-pseudo-target {
    background: var(--hq-bg-dark);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    position: relative;
}

/* ============================================================
   Form Hack (Level 9)
   ============================================================ */
.hq-form-hack form {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px dashed var(--hq-border);
}

/* ============================================================
   Bootstrap Overrides: Modals
   ============================================================ */
.modal-content {
    background: var(--hq-bg-terminal);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 255, 65, 0.08);
    color: #c9d1d9;
}

.modal-header {
    background: linear-gradient(135deg, #1a1e2e, #161b22);
    border-bottom: 1px solid var(--hq-border);
    padding: 0.75rem 1rem;
}

.modal-title {
    font-family: var(--hq-font-mono);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.modal-body {
    padding: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

.hq-presence-modal .modal-content {
    background: #071116;
    color: #e9f4ef;
    border: 1px solid rgba(0, 255, 136, 0.22);
}

.hq-presence-modal .modal-header {
    border-bottom: 1px solid rgba(0, 255, 136, 0.12);
}

.hq-presence-modal .modal-title {
    color: #00ff88;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
    font-size: 1rem;
}

.hq-presence-modal .btn-close {
    filter: brightness(0) invert(1);
}

.hq-presence-modal .modal-body {
    padding-top: 0.75rem;
    max-height: 65vh;
    overflow-y: auto;
}

.hq-presence-modal .presence-list,
.hq-presence-modal .pvp-rooms-list {
    display: grid;
    gap: 0.75rem;
}

.hq-presence-modal .presence-card,
.hq-presence-modal .pvp-room-card {
    border: 1px solid rgba(0, 255, 136, 0.12);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 1rem;
}

.hq-presence-modal .pvp-room-card {
    display: grid;
    gap: 0.75rem;
}

.hq-presence-modal .pvp-room-card .room-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.hq-presence-modal .pvp-room-card .room-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    background: rgba(0, 255, 136, 0.08);
    color: #edf8ee;
}

.hq-presence-modal .room-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hq-presence-modal .room-footer .text-muted {
    margin: 0;
}

.hq-presence-modal .modal-body::-webkit-scrollbar {
    width: 7px;
}

.hq-presence-modal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.hq-presence-modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.35);
    border-radius: 999px;
}

.modal-footer {
    background: rgba(13, 17, 23, 0.5);
    border-top: 1px solid var(--hq-border);
    padding: 0.75rem 1rem;
}

.modal-backdrop.show {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.modal.fade .modal-dialog {
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ============================================================
   Bootstrap Overrides: Buttons
   ============================================================ */
.btn {
    font-family: var(--hq-font-mono);
    letter-spacing: 0.5px;
    transition: var(--hq-transition);
    border-radius: 4px;
}

.btn-secondary {
    background: rgba(139, 148, 158, 0.15);
    border: 1px solid #484f58;
    color: #8b949e;
}

.btn-secondary:hover {
    background: rgba(139, 148, 158, 0.25);
    border-color: #8b949e;
    color: #c9d1d9;
    box-shadow: 0 0 10px rgba(139, 148, 158, 0.15);
}

.btn-danger {
    background: rgba(255, 51, 51, 0.2);
    border: 1px solid var(--hq-red);
    color: #ff6666;
}

.btn-danger:hover {
    background: rgba(255, 51, 51, 0.35);
    border-color: #ff6666;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.25);
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid #484f58;
    color: #8b949e;
    font-size: 0.8rem;
}

.btn-outline-secondary:hover {
    background: rgba(139, 148, 158, 0.15);
    border-color: #8b949e;
    color: #c9d1d9;
    box-shadow: 0 0 10px rgba(139, 148, 158, 0.1);
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--hq-red);
    color: var(--hq-red);
    font-size: 0.8rem;
}

.btn-outline-danger:hover {
    background: rgba(255, 51, 51, 0.15);
    border-color: #ff6666;
    color: #ff6666;
    box-shadow: 0 0 12px rgba(255, 51, 51, 0.2);
}

.btn-outline-success {
    background: transparent;
    border: 1px solid var(--hq-accent);
    color: var(--hq-accent);
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success.active {
    background: rgba(0, 255, 65, 0.15);
    border-color: var(--hq-accent);
    color: var(--hq-accent);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
}

.btn-close {
    filter: invert(1);
    opacity: 0.5;
    transition: var(--hq-transition);
}

.btn-close:hover {
    opacity: 1;
    filter: invert(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.btn:active {
    transform: scale(0.97);
}

/* ============================================================
   Bootstrap Overrides: Dropdown
   ============================================================ */
.dropdown-menu {
    background: var(--hq-bg-terminal);
    border: 1px solid var(--hq-border);
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 255, 65, 0.05);
    padding: 0.35rem;
    animation: dropdownFadeIn 0.2s ease-out;
}

.dropdown-item {
    font-family: var(--hq-font-mono);
    font-size: 0.8rem;
    color: #8b949e;
    border-radius: 4px;
    padding: 0.4rem 0.75rem;
    transition: var(--hq-transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 255, 65, 0.1);
    color: var(--hq-accent);
}

.dropdown-item.active,
.dropdown-item:active {
    background: rgba(0, 255, 65, 0.15);
    color: var(--hq-accent);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Bootstrap Overrides: Badges
   ============================================================ */
.badge {
    font-family: var(--hq-font-mono);
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.bg-info {
    background: rgba(0, 212, 255, 0.2) !important;
    color: var(--hq-cyan) !important;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.bg-success {
    background: rgba(0, 255, 65, 0.15) !important;
    color: var(--hq-accent) !important;
}

.bg-warning {
    background: rgba(255, 204, 0, 0.15) !important;
    color: var(--hq-yellow) !important;
}

.bg-danger {
    background: rgba(255, 51, 51, 0.15) !important;
    color: #ff6666 !important;
}

.badge-beta {
    background: rgba(168, 85, 247, 0.2) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.4);
    text-shadow: 0 0 6px rgba(168, 85, 247, 0.5);
}

/* ============================================================
   Bootstrap Overrides: Form Controls
   ============================================================ */
.form-label {
    font-family: var(--hq-font-mono);
    font-size: 0.8rem;
    color: var(--hq-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.form-text {
    font-family: var(--hq-font-mono);
    font-size: 0.7rem;
    color: #484f58;
}

.form-check {
    padding-left: 1.75rem;
}

.form-check-input {
    background-color: var(--hq-bg-dark);
    border: 1px solid var(--hq-border);
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.2em;
    transition: var(--hq-transition);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--hq-accent);
    border-color: var(--hq-accent);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.15);
    border-color: var(--hq-accent);
}

.form-check-input:checked::after {
    filter: brightness(0);
}

.form-check-label {
    font-family: var(--hq-font-mono);
    font-size: 0.8rem;
    color: #8b949e;
    cursor: pointer;
    transition: var(--hq-transition);
}

.form-check-label:hover {
    color: #c9d1d9;
}

.form-select {
    background-color: var(--hq-bg-dark);
    border: 1px solid var(--hq-border);
    color: var(--hq-accent);
    font-family: var(--hq-font-mono);
    font-size: 0.85rem;
    transition: var(--hq-transition);
}

.form-select:focus {
    border-color: var(--hq-accent);
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.15);
}

/* ============================================================
   Bootstrap Overrides: List Groups
   ============================================================ */
.list-group {
    border-radius: 6px;
}

.list-group-item {
    background: transparent;
    border-color: var(--hq-border);
    color: #c9d1d9;
    transition: var(--hq-transition);
}

.list-group-item:hover {
    background: rgba(0, 255, 65, 0.05);
}

/* ============================================================
   Bootstrap Overrides: Tables
   ============================================================ */
.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--hq-border);
    color: #c9d1d9;
}

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--hq-border);
    --bs-table-hover-bg: rgba(0, 255, 65, 0.05);
}

/* ============================================================
   Bootstrap Overrides: Text Utilities
   ============================================================ */
.text-muted {
    color: #768faf !important;
}

.text-success {
    color: var(--hq-accent) !important;
}

.text-danger {
    color: var(--hq-red) !important;
}

.text-warning {
    color: var(--hq-yellow) !important;
}

.text-info {
    color: var(--hq-cyan) !important;
}

.text-secondary {
    color: #8b949e !important;
}

/* ============================================================
   Bootstrap Overrides: Navbar Subcomponents
   ============================================================ */
.navbar-collapse {
    transition: height 0.25s ease;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-text {
    font-family: var(--hq-font-mono);
    font-size: 0.8rem;
}

/* Navbar Actions: Mobile Layout */
@media (max-width: 991.98px) {
    .hq-navbar-actions {
        width: 100%;
        padding: 0.5rem 0;
        gap: 0.5rem !important;
        justify-content: flex-start;
    }
    .hq-navbar-actions .hq-online-badge {
        order: -1;
    }
    .hq-navbar-actions .hq-player-badge {
        width: 100%;
        padding: 0.4rem 0;
        border-top: 1px solid var(--hq-border);
        border-bottom: 1px solid var(--hq-border);
    }
}

/* ============================================================
   Additional Animations
   ============================================================ */

/* Subtle hover glow for interactive cards */
.hq-terminal-box,
.hq-stat-card,
.hq-feature-card,
.hq-level-card:not(.locked),
.hq-level-header,
.hq-progress-container {
    transition: var(--hq-transition);
}

/* Neon pulse on focus for inputs */
.hq-input:focus,
.form-check-input:focus {
    animation: inputNeonPulse 1.5s ease-in-out infinite;
}

@keyframes inputNeonPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.15) !important; }
    50% { box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.3), 0 0 12px rgba(0, 255, 65, 0.1) !important; }
}

/* Modal entrance glow */
.modal.show .modal-content {
    animation: modalGlow 0.4s ease-out;
}

@keyframes modalGlow {
    0% { box-shadow: 0 0 0 rgba(0, 255, 65, 0); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 65, 0.15), 0 0 60px rgba(0, 0, 0, 0.4); }
    100% { box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 255, 65, 0.08); }
}

/* Reset option radio labels */
.hq-reset-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.hq-reset-option:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.03);
}
.hq-reset-option:has(input:checked) {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
}

/* Scan in effect for terminal boxes */
.hq-terminal-box[data-aos="fade-up"] {
    transition: transform 0.6s ease, opacity 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Button press ripple */
.hq-btn-primary:active,
.btn-danger:active,
.btn-secondary:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

/* Floating badge animation for online count */
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.hq-online-badge .badge {
    animation: badgePulse 2s ease-in-out infinite;
}

/* Table row hover slide-in highlight */
.hq-table tbody tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

.hq-table tbody tr:hover {
    transform: translateX(2px);
}

/* Stat card value count-up shimmer */
.hq-stat-value {
    background: linear-gradient(90deg, var(--hq-accent) 0%, var(--hq-cyan) 50%, var(--hq-accent) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: statShimmer 4s linear infinite;
}

@keyframes statShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Level card unlock ripple for current level */
.hq-level-card.current::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    border: 2px solid var(--hq-accent);
    opacity: 0;
    animation: levelRipple 2s ease-out infinite;
}

@keyframes levelRipple {
    0% { opacity: 0.6; inset: -2px; }
    100% { opacity: 0; inset: -12px; }
}

/* Progress bar glow animation */
.hq-progress-bar {
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 8px var(--hq-accent); }
    50% { box-shadow: 0 0 18px var(--hq-accent), 0 0 4px var(--hq-cyan); }
}

/* Responsive
   ============================================================ */
@media (max-width: 768px) {
    .hq-title {
        font-size: 1.8rem;
    }

    .hq-stat-value {
        font-size: 1.4rem;
    }

    .hq-level-card {
        min-height: 110px;
        padding: 0.75rem;
    }

    .hq-challenge-area {
        padding: 1rem;
    }

    .hq-terminal-box .terminal-body {
        padding: 12px;
    }

    .hq-footer .row > div {
        margin-bottom: 0.25rem;
    }

    /* Sidebar auf mobil schmaler */
    .hq-online-sidebar {
        width: 220px;
        right: -240px;
    }

    /* Tabellen nicht umbrechen */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 576px) {
    .hq-login-wrapper {
        padding: 1rem 0.5rem;
    }

    .hq-level-btn {
        width: 30px;
        height: 30px;
        font-size: 0.65rem;
    }

    /* Stat Cards auf kleinen Bildschirmen */
    .hq-stat-card {
        padding: 0.5rem;
    }
    .hq-stat-value {
        font-size: 1.1rem;
    }
    .hq-stat-label {
        font-size: 0.6rem;
    }

    /* Feature Cards einzeilig */
    .hq-feature-card h6 {
        font-size: 0.8rem;
    }
    .hq-feature-card small {
        font-size: 0.7rem;
    }

    /* Footer: nicht mehr fixed auf kleinen Screens */
    .hq-footer {
        position: static;
        padding: 0.5rem 0;
    }
    .hq-footer .col-md-4 {
        padding: 0.1rem 0;
    }

    /* Kein padding-bottom mehr nötig da Footer nicht mehr fixed */
    .hq-main {
        padding-bottom: 0.5rem !important;
    }

    /* Navbar Brand kleiner */
    .hq-brand {
        font-size: 1rem;
    }
    .hq-brand .brand-text {
        display: none;
    }

    /* Terminal Text */
    .terminal-body {
        font-size: 0.8rem;
    }
    .terminal-line {
        font-size: 0.75rem;
        word-break: break-word;
    }

    /* Sidebar für sehr kleine Screens verstecken */
    .hq-online-sidebar {
        display: none;
    }
}

/* ============================================================
   Typing Cursor Animation
   ============================================================ */
.typing-cursor::after {
    content: '█';
    animation: cursorBlink 0.8s step-end infinite;
    color: var(--hq-accent);
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ============================================================
   Level Completion Animation
   ============================================================ */
.level-complete-anim {
    animation: levelComplete 0.6s ease-out;
}

@keyframes levelComplete {
    0% { transform: scale(1); }
    30% { transform: scale(1.05); }
    60% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

/* ============================================================
   Page-specific body padding for fixed footer
   ============================================================ */
body {
    padding-bottom: 60px;
}

/* Navbar toggler */
.navbar-toggler {
    border-color: var(--hq-border);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.3);
}

/* ============================================================
   TERMINAL MODE — Fullscreen Hacker Console
   ============================================================ */

/* Fullscreen container */
.hq-fullscreen-terminal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', Consolas, 'Liberation Mono', monospace;
    overflow: hidden;
    z-index: 9999;
}

/* CRT scanline overlay */
.hq-term-scanlines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 10;
}

/* Status bar */
.hq-term-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    background: linear-gradient(135deg, #0d1117 0%, #0a0e17 100%);
    border-bottom: 1px solid rgba(0, 255, 65, 0.15);
    flex-shrink: 0;
    z-index: 11;
}

.hq-term-status-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hq-term-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff41;
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.6);
    animation: statusBlink 3s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0.3; }
}

.hq-term-status-text {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.5px;
}

.hq-term-status-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hq-term-timer {
    font-size: 0.85rem;
    color: var(--hq-accent, #00ff41);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.hq-term-score {
    font-size: 0.85rem;
    color: #ffc107;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hq-term-exit-btn {
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
    padding: 4px;
}
.hq-term-exit-btn:hover {
    color: #ff4444;
}

/* Terminal output body */
.hq-term-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #c0c0c0;
    scroll-behavior: smooth;
    z-index: 11;
}

.hq-term-body::-webkit-scrollbar {
    width: 5px;
}
.hq-term-body::-webkit-scrollbar-track {
    background: #0a0a0a;
}
.hq-term-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 65, 0.25);
    border-radius: 3px;
}
.hq-term-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 65, 0.5);
}

.hq-term-line {
    min-height: 1.25em;
    word-break: break-all;
}

/* Input line */
.hq-term-input-line {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 255, 65, 0.02);
    border-top: 1px solid rgba(0, 255, 65, 0.1);
    flex-shrink: 0;
    z-index: 11;
}

.hq-term-prompt {
    font-size: 0.9rem;
    color: #00ff41;
    white-space: nowrap;
    flex-shrink: 0;
}

#hq-term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9rem;
    caret-color: #00ff41;
    margin-left: 2px;
}
#hq-term-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
#hq-term-input::placeholder {
    color: rgba(255,255,255,0.15);
}

/* Terminal Text Colors */
.t-green  { color: #00ff41; }
.t-red    { color: #ff4444; }
.t-yellow { color: #ffd700; }
.t-cyan   { color: #00e5ff; }
.t-dim    { color: #555; }
.t-bold   { font-weight: bold; }
.t-prompt { color: #00ff41; }

/* === Split Terminal Layout === */
.hq-term-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.hq-term-main .hq-term-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.hq-term-main.hq-term-split {
    flex-direction: row;
}
.hq-term-main.hq-term-split .hq-term-left {
    flex: 0 0 60%;
    min-width: 0;
    border-right: 1px solid rgba(0, 255, 65, 0.15);
}
.hq-term-main.hq-term-split .hq-term-right {
    flex: 0 0 40%;
    overflow-y: auto;
    padding: 16px;
    background: rgba(0, 8, 4, 0.6);
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.8rem;
    color: #c0c0c0;
}
.hq-term-right::-webkit-scrollbar { width: 4px; }
.hq-term-right::-webkit-scrollbar-track { background: transparent; }
.hq-term-right::-webkit-scrollbar-thumb { background: rgba(0,255,65,0.2); border-radius: 2px; }

/* UI Panel Header */
.hq-ui-header {
    font-size: 0.85rem;
    font-weight: bold;
    color: #00e5ff;
    padding: 8px 0 12px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    margin-bottom: 12px;
}
.hq-ui-header i { margin-right: 6px; }
.hq-ui-header-warning { color: #ffd700; border-bottom-color: rgba(255, 215, 0, 0.2); }
.hq-ui-header-danger { color: #ff4444; border-bottom-color: rgba(255, 68, 68, 0.2); }

/* UI Table */
.hq-ui-table { margin-bottom: 12px; }
.hq-ui-row {
    display: grid;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.75rem;
    align-items: center;
}
.hq-ui-row > span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}
.hq-ui-row-header {
    color: #00ff41;
    font-weight: bold;
    border-bottom-color: rgba(0,255,65,0.15);
}
.hq-ui-row.hq-ui-danger { color: #ff4444; }
/* process_kill: PID | CPU | MEM | CMD | STATUS */
.hq-ui-table-proc .hq-ui-row { grid-template-columns: 44px 44px 44px 1fr 60px; }
/* package_check: Package | Version | MD5 | Status */
.hq-ui-table-pkg .hq-ui-row  { grid-template-columns: 1fr 60px 80px 56px; }
.hq-ui-mono { font-size: 0.68rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* UI Checklist */
.hq-ui-checklist { margin: 12px 0; }
.hq-ui-check {
    padding: 6px 0;
    font-size: 0.78rem;
    color: #ff4444;
}
.hq-ui-check i { margin-right: 6px; width: 14px; text-align: center; }
.hq-ui-check.hq-ui-check-done { color: #00ff41; }

/* UI Progress Bar */
.hq-ui-progress {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    margin: 10px 0 4px;
    overflow: hidden;
}
.hq-ui-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00e5ff);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.hq-ui-progress-complete { background: linear-gradient(90deg, #00ff41, #ffd700) !important; }
.hq-ui-progress-label {
    font-size: 0.72rem;
    color: #555;
    text-align: center;
}

/* UI Network Map */
.hq-ui-netmap { display: flex; flex-direction: column; gap: 8px; }
.hq-ui-node {
    padding: 8px;
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: 4px;
    background: rgba(0,229,255,0.03);
}
.hq-ui-node-danger { border-color: rgba(255,68,68,0.4); background: rgba(255,68,68,0.05); }
.hq-ui-node-ip { font-weight: bold; color: #00e5ff; }
.hq-ui-node-danger .hq-ui-node-ip { color: #ff4444; }
.hq-ui-node-host { font-size: 0.72rem; color: #888; }
.hq-ui-node-ports { font-size: 0.72rem; color: #555; }
.hq-ui-placeholder {
    color: #444;
    text-align: center;
    padding: 30px 0;
    font-style: italic;
}
.hq-ui-connected {
    color: #00ff41;
    padding: 8px;
    border: 1px solid rgba(0,255,65,0.2);
    border-radius: 4px;
    text-align: center;
    margin-top: 8px;
}

/* UI Remote Desktop */
.hq-ui-remote { display: flex; justify-content: center; padding: 20px 0; }
.hq-ui-screen-off, .hq-ui-screen-on {
    width: 220px;
    padding: 30px 20px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    text-align: center;
}
.hq-ui-screen-off { background: rgba(0,0,0,0.6); color: #444; }
.hq-ui-screen-off i { font-size: 2rem; margin-bottom: 8px; }
.hq-ui-screen-on { background: rgba(0,229,255,0.04); border-color: rgba(0,229,255,0.2); color: #00e5ff; }
.hq-ui-screen-on i { font-size: 2rem; margin-bottom: 8px; }

/* UI Timeline */
.hq-ui-timeline { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.hq-ui-snap {
    padding: 8px;
    border-left: 3px solid #444;
    padding-left: 12px;
    font-size: 0.78rem;
}
.hq-ui-snap-clean { border-left-color: #00ff41; }
.hq-ui-snap-infected { border-left-color: #ff4444; }
.hq-ui-snap-date { font-weight: bold; color: #00e5ff; }
.hq-ui-snap-status { font-size: 0.68rem; color: #888; }

/* UI Files */
.hq-ui-files { margin-bottom: 12px; }
.hq-ui-file {
    padding: 6px 0;
    font-size: 0.78rem;
}
.hq-ui-file i { margin-right: 6px; }
.hq-ui-file.hq-ui-danger { color: #ff4444; }
.hq-ui-file.hq-ui-success { color: #00ff41; }

/* UI Boot Sequence */
.hq-ui-boot { margin-bottom: 12px; }
.hq-ui-boot-line {
    padding: 3px 0;
    font-size: 0.78rem;
}
.hq-ui-boot-line.hq-ui-success { color: #00ff41; }
.hq-ui-boot-line.hq-ui-danger { color: #ff4444; }
.hq-ui-boot-line.blink { animation: termBlink 1s step-end infinite; }
@keyframes termBlink { 50% { opacity: 0; } }

/* UI Alerts */
.hq-ui-alerts { margin-bottom: 12px; }
.hq-ui-alert {
    padding: 6px 0;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hq-ui-alert-active { color: #ff4444; }
.hq-ui-alert-resolved { color: #00ff41; text-decoration: line-through; opacity: 0.7; }
.hq-ui-sev {
    display: inline-block;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: bold;
    margin-right: 4px;
    background: rgba(255,68,68,0.2);
    color: #ff4444;
}
.hq-ui-alert-resolved .hq-ui-sev { background: rgba(0,255,65,0.1); color: #00ff41; }

/* UI Threats (War Room) */
.hq-ui-threats { margin-bottom: 12px; }
.hq-ui-threat {
    padding: 8px 0;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hq-ui-threat-active { color: #ff4444; }
.hq-ui-threat-done { color: #00ff41; }

/* Shared dim / success colors */
.hq-ui-dim { color: #555; }
.hq-ui-success { color: #00ff41; }

/* Responsive Split */
@media (max-width: 900px) {
    .hq-term-main.hq-term-split {
        flex-direction: column;
    }
    .hq-term-main.hq-term-split .hq-term-left {
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 65, 0.15);
    }
    .hq-term-main.hq-term-split .hq-term-right {
        width: 100%;
        max-height: 35vh;
    }
}

/* Terminal Level Navigation Dots */
.hq-term-level-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 8px 0;
}

.hq-term-lvl-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    font-weight: bold;
    border: 1px solid var(--hq-border);
    background: rgba(10, 14, 23, 0.8);
    color: #555;
    transition: all 0.3s ease;
}

.hq-term-lvl-dot.completed {
    background: rgba(0, 255, 65, 0.15);
    border-color: var(--hq-accent);
    color: var(--hq-accent);
}

.hq-term-lvl-dot.current {
    background: rgba(0, 229, 255, 0.15);
    border-color: #00e5ff;
    color: #00e5ff;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
    animation: termPulse 2s ease-in-out infinite;
}

.hq-term-lvl-dot.locked {
    opacity: 0.3;
}

@keyframes termPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, 0.4); }
    50% { box-shadow: 0 0 16px rgba(0, 229, 255, 0.7); }
}

/* Terminal Score Display */
.hq-term-score-display {
    font-family: 'Courier New', monospace;
}

/* Page Terminal — reduce clutter */
.page-terminal .hq-online-sidebar {
    display: none;
}

/* Cursor blink animation */
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Fullscreen terminal — hide scrollbars on body */
.page-terminal {
    overflow: hidden;
}

/* Terminal Category Cards on game.php */
.hq-category-card {
    background: rgba(10, 14, 23, 0.6);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.hq-category-card:hover {
    border-color: var(--hq-accent);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
    transform: translateY(-2px);
}
.hq-category-card.active {
    border-color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.05);
}
.hq-category-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* Responsive Terminal */
@media (max-width: 768px) {
    .hq-term-body {
        font-size: 0.78rem;
        padding: 10px 12px;
    }
    #hq-term-input {
        font-size: 0.78rem;
    }
    .hq-term-prompt {
        font-size: 0.78rem;
    }
    .hq-term-statusbar {
        padding: 4px 10px;
    }
    .hq-term-status-text {
        font-size: 0.7rem;
    }
    .hq-term-lvl-dot {
        width: 24px;
        height: 24px;
        font-size: 0.55rem;
    }
}

/* =============================================
   Game Mode Tabs (Mission Control)
   ============================================= */
.hq-game-tabs {
    display: flex;
    gap: 8px;
    border: none;
    padding: 0;
    list-style: none;
}

.hq-game-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    background: var(--hq-bg-terminal);
    color: #8b949e;
    font-family: var(--hq-font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--hq-transition);
}

.hq-game-tab:hover {
    border-color: var(--hq-border-glow);
    color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.05);
}

.hq-game-tab.active {
    border-color: var(--hq-accent);
    color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.15);
}

.hq-tab-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
}

.hq-game-tab.active .hq-tab-badge {
    background: rgba(0, 255, 65, 0.2);
}

.hq-game-tabs-sm .hq-game-tab {
    padding: 6px 14px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.hq-game-tabs-sm .hq-tab-badge {
    font-size: 0.6rem;
    padding: 1px 6px;
}

@media (max-width: 576px) {
    .hq-game-tabs {
        gap: 4px;
    }
    .hq-game-tab {
        padding: 8px 12px;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        flex: 1;
        justify-content: center;
    }
}

/* ============================================================
   PROFILE SYSTEM
   ============================================================ */

.hq-profile-avatar {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid rgba(0, 255, 65, 0.2);
}

.hq-recovery-code {
    user-select: all;
    cursor: pointer;
    transition: color 0.3s;
}

.hq-icon-option {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.2s;
    color: #8b8b8b;
}
.hq-icon-option:hover {
    border-color: var(--hq-accent);
    color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.05);
}
.hq-icon-option.active {
    border-color: var(--hq-accent);
    color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.hq-color-option {
    width: 32px;
    height: 32px;
    display: inline-block;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.hq-color-option:hover {
    transform: scale(1.2);
    border-color: rgba(255,255,255,0.5);
}
.hq-color-option.active {
    border-color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Navbar profile link */
a.hq-player-badge {
    color: inherit;
    transition: all 0.2s;
}
a.hq-player-badge:hover {
    color: var(--hq-accent);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

/* Admin page specific */
.page-admin .form-select.hq-input {
    background-color: var(--hq-bg-dark);
    border-color: rgba(0, 255, 65, 0.2);
    color: var(--hq-accent);
    font-size: 0.75rem;
    padding: 2px 8px;
}

@media (max-width: 768px) {
    .hq-profile-avatar {
        width: 60px;
        height: 60px;
    }
    .hq-profile-avatar .fa-4x {
        font-size: 2em;
    }
}

/* ============================================================
   PROFILE ACHIEVEMENT CARDS
   ============================================================ */

.hq-achievement-card {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}
.hq-achievement-card.locked {
    opacity: 0.45;
    filter: grayscale(0.8);
}
.hq-achievement-card.unlocked {
    background: rgba(0, 255, 65, 0.03);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}
.hq-achievement-card.unlocked:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hq-captcha-question {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 165, 0, 0.2);
    font-size: 1.05rem;
}

/* ============================================================
   CHANGELOG PAGINATION
   ============================================================ */
.hq-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
}
.hq-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.hq-page-link:hover {
    border-color: rgba(0, 255, 65, 0.5);
    color: #00ff41;
    background: rgba(0, 255, 65, 0.05);
    text-decoration: none;
}
.hq-page-link.active {
    background: rgba(0, 255, 65, 0.12);
    border-color: #00ff41;
    color: #00ff41;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.15);
}

/* === PLAYER SEARCH PAGE === */

.hq-player-search-list {
    max-height: 500px;
    overflow-y: auto;
}
.hq-player-search-list::-webkit-scrollbar { width: 6px; }
.hq-player-search-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.hq-player-search-list::-webkit-scrollbar-thumb { background: #00ff41; border-radius: 3px; }

.hq-player-row {
    transition: background 0.15s;
}
.hq-player-row:hover {
    background: rgba(0, 255, 65, 0.05);
}
.hq-player-row:last-child {
    border-bottom: none !important;
}

#players-online-list {
    max-height: 500px;
    overflow-y: auto;
}
#players-online-list::-webkit-scrollbar { width: 6px; }
#players-online-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
#players-online-list::-webkit-scrollbar-thumb { background: #00ff41; border-radius: 3px; }

#player-search-input:focus {
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
    border-color: #00ff41;
}

/* Color swatch buttons (profile avatar color picker) */
.hq-color-swatch { width: 30px; height: 30px; border: none; }
.hq-color-swatch.hq-color-selected { border: 2px solid #fff; }

/* ============================================================
   Game Mode Cards – Spielauswahl v2.4.4
   ============================================================ */
.hq-game-mode-card {
    background: var(--hq-bg-card);
    border: 1px solid var(--hq-border);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    transition: var(--hq-transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}
.hq-game-mode-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--hq-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.hq-game-mode-card:hover::before { opacity: 1; }
.hq-game-mode-card:hover {
    border-color: var(--hq-accent);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.15);
    transform: translateY(-4px);
}
.hq-game-mode-card.terminal-mode::before { background: var(--hq-cyan); }
.hq-game-mode-card.terminal-mode:hover { border-color: var(--hq-cyan); box-shadow: 0 0 25px rgba(0, 212, 255, 0.15); }
.hq-game-mode-card.pvp-mode::before { background: var(--hq-red); }
.hq-game-mode-card.pvp-mode:hover { border-color: var(--hq-red); box-shadow: 0 0 25px rgba(255, 51, 51, 0.15); }
.hq-game-mode-card .gmc-icon { font-size: 2.8rem; color: var(--hq-accent); }
.hq-game-mode-card .gmc-title { font-family: var(--hq-font-mono); font-size: 1.05rem; font-weight: 700; color: #c9d1d9; text-transform: uppercase; letter-spacing: 0.08em; }
.hq-game-mode-card .gmc-desc { font-size: 0.82rem; color: #8b949e; line-height: 1.5; }
.hq-game-mode-card .gmc-progress { width: 100%; }
.hq-game-mode-card .gmc-stats { width: 100%; }
.hq-game-mode-card .gmc-cta { font-family: var(--hq-font-mono); font-size: 0.8rem; font-weight: 700; color: var(--hq-accent); letter-spacing: 0.05em; margin-top: 0.25rem; }
.hq-game-mode-card .gmc-presence { margin-top: 0.55rem; }
.presence-badge {
    font-size: 0.82rem;
    font-family: var(--hq-font-mono);
    background: rgba(255,255,255,0.12);
    color: #c9d1d9;
    border: 1px solid rgba(0,255,65,0.18);
    border-radius: 22px;
    padding: 0.35rem 0.85rem;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    pointer-events: auto;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 0 0 rgba(0,255,65,0);
    opacity: 0.45;
}
.presence-badge:hover {
    transform: translateY(-1px);
    background: rgba(0,255,65,0.18);
    color: #f6ffe8;
    border-color: rgba(0,255,65,0.55);
    box-shadow: 0 14px 30px rgba(0,255,65,0.14);
}
.presence-badge.pulse {
    animation: presencePulse 1.6s ease-in-out infinite;
    background: rgba(0,255,65,0.28);
    color: #ffffff;
    border-color: rgba(0,255,65,0.95);
    box-shadow: 0 0 14px 4px rgba(0,255,65,0.18);
    animation-fill-mode: both;
    opacity: 1;
}
@keyframes presencePulse {
    0% {
        transform: translateY(0);
        background: rgba(0,255,65,0.28);
        border-color: rgba(0,255,65,0.95);
        box-shadow: 0 0 0 0 rgba(0,255,65,0.18);
    }
    25% {
        transform: translateY(-0.5px);
        background: rgba(0,255,65,0.32);
        box-shadow: 0 0 18px 6px rgba(0,255,65,0.22);
    }
    50% {
        transform: translateY(0);
        background: rgba(0,255,65,0.30);
        box-shadow: 0 0 20px 8px rgba(0,255,65,0.20);
    }
    75% {
        transform: translateY(-0.5px);
        background: rgba(0,255,65,0.31);
        box-shadow: 0 0 18px 6px rgba(0,255,65,0.22);
    }
    100% {
        transform: translateY(0);
        background: rgba(0,255,65,0.28);
        box-shadow: 0 0 0 0 rgba(0,255,65,0.18);
    }
}

/* ============================================================
   Category Cards – Web Puzzle v2.4.4
   ============================================================ */
.hq-category-card {
    background: var(--hq-bg-card);
    border: 1px solid var(--hq-border);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: var(--hq-transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    overflow: hidden;
    height: 100%;
}
.hq-category-card:not(.locked):hover {
    border-color: rgba(0, 255, 65, 0.5);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.12);
    transform: translateY(-3px);
}
.hq-category-card.completed {
    border-color: rgba(0, 255, 65, 0.3);
    background: linear-gradient(135deg, var(--hq-bg-card), rgba(0, 255, 65, 0.04));
}
.hq-category-card.locked { opacity: 0.4; cursor: not-allowed; }
.hq-category-card .cat-icon { font-size: 2.2rem; }
.hq-category-card .cat-title { font-family: var(--hq-font-mono); font-size: 0.9rem; font-weight: 700; color: #c9d1d9; text-transform: uppercase; letter-spacing: 0.08em; }
.hq-category-card .cat-desc { font-size: 0.78rem; color: #8b949e; line-height: 1.4; }
.hq-category-card .cat-difficulty { font-size: 0.55rem; }
.hq-category-card .cat-progress { width: 100%; }

/* Section header row */
.hq-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--hq-border);
}

/* Active category badge */
.hq-badge-active {
    background: rgba(0, 255, 65, 0.1);
    color: var(--hq-accent);
    font-family: var(--hq-font-mono);
}

/* ============================================================
   Breadcrumb Navigation – v2.4.4
   ============================================================ */
.hq-breadcrumb {
    background: var(--hq-bg-card);
    border: 1px solid var(--hq-border);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    overflow: hidden;
}

.hq-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--hq-font-mono);
    font-size: 0.875rem;
}

.hq-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #8b949e;
    transition: var(--hq-transition);
}

.hq-breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--hq-border);
    font-weight: bold;
}

.hq-breadcrumb-item.active {
    color: var(--hq-accent);
    font-weight: 600;
}

.hq-breadcrumb-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: var(--hq-transition);
    background: transparent;
}

.hq-breadcrumb-link:hover {
    color: var(--hq-accent);
    background: rgba(0, 255, 65, 0.08);
    text-decoration: none;
}

.hq-breadcrumb-link:focus {
    outline: 2px solid var(--hq-accent);
    outline-offset: 2px;
}

/* Responsive: Stack vertically on small screens */
@media (max-width: 576px) {
    .hq-breadcrumb-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .hq-breadcrumb-item:not(:last-child)::after {
        display: none;
    }
    
    .hq-breadcrumb-item {
        width: 100%;
    }
    
    .hq-breadcrumb-link {
        width: 100%;
        justify-content: flex-start;
    }
}
