/* ========================================
   CYBERPUNK 3D ROOM - Premium Visual Design v2.0
   Enhanced with more content and effects
   ======================================== */

:root {
    /* Neon Colors */
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00ff;
    --neon-purple: #9d00ff;
    --neon-green: #00ff88;
    --neon-orange: #ff6600;
    --neon-pink: #ff0080;
    --neon-yellow: #ffff00;
    --neon-blue: #0080ff;

    /* Background Colors */
    --bg-primary: #0a0a12;
    --bg-secondary: #12121f;
    --bg-tertiary: #1a1a2e;
    --bg-panel: rgba(10, 10, 18, 0.9);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #606078;
    --text-accent: #00f0ff;

    /* Gradients */
    --gradient-cyber: linear-gradient(135deg, #00f0ff 0%, #ff00ff 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a12 0%, #1a1a2e 50%, #0a0a12 100%);
    --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);

    /* Glow Effects */
    --glow-cyan: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 0 0 40px #00f0ff;
    --glow-magenta: 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #ff00ff;
    --glow-green: 0 0 10px #00ff88, 0 0 20px #00ff88;
    --glow-soft: 0 0 5px rgba(0, 240, 255, 0.5), 0 0 15px rgba(0, 240, 255, 0.3);

    /* Animation Speeds */
    --speed-fast: 0.2s;
    --speed-normal: 0.4s;
    --speed-slow: 1s;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Rajdhani', 'Noto Sans SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* WebGL Canvas */
#webgl-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

/* ========================================
   LOADING SCREEN - Cyberpunk Style
   ======================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    transition: opacity 1s ease, visibility 1s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    position: relative;
    text-align: center;
    animation: fadeIn 0.8s ease;
    pointer-events: auto; /* Allow clicks on entire content */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-content > * {
    pointer-events: auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cyber Loader Bars */
.cyber-loader {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 30px;
    height: 50px;
}

.loader-bar {
    width: 8px;
    height: 100%;
    background: var(--neon-cyan);
    animation: loaderPulse 1s ease-in-out infinite;
    border-radius: 2px;
    box-shadow: var(--glow-cyan);
}

.loader-bar:nth-child(1) { animation-delay: 0s; }
.loader-bar:nth-child(2) { animation-delay: 0.1s; background: var(--neon-magenta); box-shadow: var(--glow-magenta); }
.loader-bar:nth-child(3) { animation-delay: 0.2s; }
.loader-bar:nth-child(4) { animation-delay: 0.3s; background: var(--neon-magenta); box-shadow: var(--glow-magenta); }
.loader-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes loaderPulse {
    0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.loader-text {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    margin-bottom: 20px;
    animation: textGlow 2s ease-in-out infinite;
}

.loader-subtitle {
    display: block;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 15px;
    letter-spacing: 2px;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan); }
    50% { text-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan), 0 0 60px var(--neon-cyan); }
}

/* Progress Bar */
.loader-progress {
    width: 300px;
    height: 4px;
    background: rgba(0, 240, 255, 0.2);
    border-radius: 2px;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--gradient-cyber);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: var(--glow-cyan);
}

.loader-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    letter-spacing: 3px;
    margin-top: 20px;
    animation: blink 1.5s ease-in-out infinite;
}

@media (max-width: 768px) {
    .loader-hint {
        font-size: 1rem;
        letter-spacing: 2px;
    }
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

/* ========================================
   CROSSHAIR - Animated Cyberpunk
   ======================================== */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
}

#crosshair.hidden {
    display: none;
}

.crosshair-inner {
    position: relative;
    width: 60px;
    height: 60px;
}

.crosshair-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan);
    animation: dotPulse 1s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
}

.crosshair-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    opacity: 0.6;
    animation: ringRotate 3s linear infinite;
}

.crosshair-ring.delay {
    width: 50px;
    height: 50px;
    border-color: var(--neon-magenta);
    opacity: 0.4;
    animation-delay: -1.5s;
    animation-direction: reverse;
}

@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========================================
   HUD INTERFACE - Cyberpunk Panels
   ======================================== */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
}

#hud.hidden {
    display: none;
}

#hud > * {
    pointer-events: auto;
}

.hud-panel {
    position: absolute;
    animation: panelSlide 0.5s ease;
}

@keyframes panelSlide {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.hud-panel.top-left {
    top: 20px;
    left: 20px;
}

.hud-panel.top-right {
    top: 20px;
    right: 20px;
}

.hud-panel.bottom-left {
    bottom: 20px;
    left: 20px;
}

.hud-panel.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.hud-panel.bottom-right {
    bottom: 20px;
    right: 20px;
}

/* HUD Header Panel */
.hud-header {
    background: var(--bg-panel);
    border: 1px solid var(--neon-cyan);
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: var(--glow-soft);
    backdrop-filter: blur(10px);
}

.hud-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 2px;
}

.hud-version {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Orbitron', monospace;
}

/* Stats Display */
.hud-stats {
    margin-top: 10px;
    display: flex;
    gap: 15px;
}

.stat-item {
    background: var(--bg-panel);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    backdrop-filter: blur(5px);
}

.stat-label {
    display: block;
    font-size: 0.625rem;
    color: var(--text-muted);
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-size: 0.875rem;
    color: var(--neon-green);
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

/* Controls Panel */
.controls-panel {
    background: var(--bg-panel);
    border: 1px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 15px 20px;
    backdrop-filter: blur(10px);
    box-shadow: var(--glow-soft);
}

.panel-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.875rem;
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.control-grid {
    display: grid;
    gap: 8px;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(0, 240, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.key {
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
}

.key.wide {
    min-width: 60px;
}

.action {
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.controls-tip {
    margin-top: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.625rem;
    font-style: italic;
}

/* ========================================
   PROFILE CARD - Enhanced Design
   ======================================== */
.profile-card {
    background: var(--bg-panel);
    border: 1px solid var(--neon-magenta);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
    max-width: 320px;
    animation: cardPulse 4s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 0, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 255, 0.5); }
}

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

.avatar-container {
    position: relative;
    width: 60px;
    height: 60px;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: avatarGlow 2s ease-in-out infinite;
}

@keyframes avatarGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.avatar {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 2px solid var(--neon-magenta);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.card-title-section {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    color: var(--neon-magenta);
    letter-spacing: 2px;
    font-weight: 700;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.card-content {
    margin-top: 10px;
}

.card-bio {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.skill-tag {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.7rem;
    color: var(--neon-cyan);
    font-family: 'Orbitron', monospace;
}

.card-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cyber-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--neon-cyan);
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: all var(--speed-fast) ease;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.cyber-link:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: var(--glow-soft);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 1rem;
}

/* ========================================
   PROJECTS PANEL
   ======================================== */
.projects-panel {
    background: var(--bg-panel);
    border: 1px solid var(--neon-green);
    border-radius: 16px;
    padding: 15px 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.projects-panel .panel-title {
    color: var(--neon-green);
    margin-bottom: 12px;
}

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

.project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--speed-fast) ease;
}

.project-item:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    transform: translateY(-3px);
}

.project-icon {
    font-size: 1.5rem;
}

.project-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    font-family: 'Noto Sans SC', sans-serif;
}

/* ========================================
   MINI MAP & SOCIAL LINKS
   ======================================== */
.mini-map-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.mini-map {
    width: 120px;
    height: 120px;
    background: var(--bg-panel);
    border: 1px solid var(--neon-cyan);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--glow-soft);
}

#mini-map-canvas {
    width: 100%;
    height: 100%;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-panel);
    border: 1px solid var(--neon-cyan);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    transition: all var(--speed-fast) ease;
    text-decoration: none;
}

.social-link:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: var(--glow-soft);
    transform: translateY(-2px);
}

/* ========================================
   AUDIO CONTROLS
   ======================================== */
#audio-controls {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-panel);
    border: 1px solid var(--neon-purple);
    border-radius: 25px;
    padding: 8px 15px;
    backdrop-filter: blur(10px);
}

#audio-controls.hidden {
    display: none;
}

.audio-btn {
    background: none;
    border: none;
    color: var(--neon-purple);
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--speed-fast) ease;
}

.audio-btn:hover {
    color: var(--neon-cyan);
}

.audio-icon {
    font-size: 1rem;
}

.audio-slider input {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(157, 0, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

.audio-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--neon-purple);
    border-radius: 50%;
    cursor: pointer;
}

/* ========================================
   MOBILE CONTROLS - Touch Interface
   ======================================== */
#mobile-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
    display: flex;
    touch-action: none; /* Prevent default touch actions */
}

#mobile-controls.hidden {
    display: none;
}

#mobile-controls > * {
    pointer-events: auto;
}

.touch-zone {
    position: absolute;
    width: 40%;
    height: 50%;
    bottom: 100px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.touch-zone.left {
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.touch-zone.right {
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Joystick */
.joystick-base {
    width: 120px;
    height: 120px;
    background: rgba(0, 240, 255, 0.15);
    border: 3px solid var(--neon-cyan);
    border-radius: 50%;
    position: relative;
    box-shadow: var(--glow-soft);
    touch-action: none;
}

.joystick-stick {
    width: 50px;
    height: 50px;
    background: var(--neon-cyan);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--glow-cyan);
    transition: transform 0.05s ease;
    touch-action: none;
}

/* Look Indicator */
.look-indicator {
    background: rgba(255, 0, 255, 0.15);
    border: 3px solid var(--neon-magenta);
    border-radius: 16px;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.look-indicator span {
    color: var(--neon-magenta);
    font-family: 'Orbitron', monospace;
    font-size: 0.875rem;
    letter-spacing: 2px;
}

/* Action Buttons */
.action-buttons {
    position: absolute;
    bottom: 30px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 101;
}

.action-btn {
    background: rgba(0, 255, 136, 0.3);
    border: 2px solid var(--neon-green);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    color: var(--neon-green);
    font-family: 'Orbitron', 'Noto Sans SC', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--speed-fast) ease;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.action-btn.run {
    background: rgba(255, 102, 0, 0.2);
    border-color: var(--neon-orange);
    color: var(--neon-orange);
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.3);
}

/* ========================================
   MODAL - Cyberpunk Style
   ======================================== */
#interaction-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

#interaction-modal.hidden {
    display: none;
}

.cyber-modal {
    background: var(--bg-panel);
    border: 2px solid var(--neon-cyan);
    border-radius: 16px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--glow-cyan);
    backdrop-filter: blur(20px);
    animation: modalPop 0.3s ease;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
    padding-bottom: 15px;
}

.modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    color: var(--neon-cyan);
    letter-spacing: 2px;
}

.modal-close {
    background: none;
    border: 1px solid var(--neon-magenta);
    color: var(--neon-magenta);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--speed-fast) ease;
}

.modal-close:hover {
    background: rgba(255, 0, 255, 0.2);
    box-shadow: var(--glow-magenta);
}

.modal-body {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.modal-body h3 {
    color: var(--neon-cyan);
    font-family: 'Orbitron', monospace;
    margin-bottom: 10px;
}

.modal-body p {
    margin-bottom: 10px;
}

/* ========================================
   VISUAL EFFECTS - Scanlines & Vignette
   ======================================== */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.15;
    animation: scanlinesMove 10s linear infinite;
}

@keyframes scanlinesMove {
    from { transform: translateY(0); }
    to { transform: translateY(10px); }
}

#vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

#glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 998;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 0, 255, 0.1) 50%,
        transparent 100%
    );
}

#glitch-overlay.active {
    animation: glitchEffect 0.3s ease;
}

@keyframes glitchEffect {
    0% { opacity: 0; transform: translateX(-100%); }
    25% { opacity: 1; transform: translateX(0); }
    50% { opacity: 0; transform: translateX(100%); }
    75% { opacity: 1; transform: translateX(-50%); }
    100% { opacity: 0; transform: translateX(0); }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .hud-panel.bottom-center {
        display: none;
    }
}

@media (max-width: 768px) {
    .hud-panel.top-right {
        display: none;
    }

    .hud-panel.bottom-right {
        position: fixed;
        bottom: 80px;
        right: 10px;
    }

    .hud-panel.bottom-right .mini-map {
        width: 80px;
        height: 80px;
    }

    .hud-panel.top-left {
        top: 10px;
        left: 10px;
    }

    .hud-panel.bottom-left {
        bottom: 80px;
        left: 10px;
    }

    .profile-card {
        max-width: 200px;
        padding: 12px;
    }

    .avatar-container {
        width: 40px;
        height: 40px;
    }

    .avatar {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .avatar-glow {
        width: 50px;
        height: 50px;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .card-subtitle {
        font-size: 0.65rem;
    }

    .card-bio {
        font-size: 0.7rem;
    }

    .skill-tags {
        display: none;
    }

    .card-links {
        flex-direction: column;
        gap: 6px;
    }

    .cyber-link {
        padding: 6px 8px;
        font-size: 0.65rem;
    }

    .loader-text {
        font-size: 1rem;
    }

    .hud-stats {
        flex-direction: column;
        gap: 8px;
    }

    #audio-controls {
        top: 10px;
        padding: 6px 10px;
    }

    .audio-slider {
        display: none;
    }
}

@media (max-width: 480px) {
    .hud-panel.top-left {
        width: calc(100% - 20px);
    }

    .hud-header {
        width: 100%;
    }

    .hud-stats {
        width: 100%;
        flex-direction: row;
    }

    .stat-item {
        flex: 1;
        text-align: center;
    }

    .social-links {
        flex-direction: column;
        gap: 5px;
    }

    .social-link {
        width: 35px;
        height: 35px;
    }
}

/* ========================================
   GLITCH EFFECT (for special moments)
   ======================================== */
.glitch {
    animation: glitch 0.3s ease;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
    100% { transform: translate(0); }
}

/* ========================================
   HOVER INTERACTIONS
   ======================================== */
.hud-panel:hover {
    filter: brightness(1.1);
}

.hud-panel:hover .hud-header,
.hud-panel:hover .controls-panel,
.hud-panel:hover .profile-card {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

/* Custom scrollbar for modal content */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 240, 255, 0.1);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 3px;
}
