/* CritZone - 80s Hacker Theme CSS */

/* CSS Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-green: #0f0;
    --neon-cyan: #0ff;
    --neon-pink: #f0f;
    --neon-yellow: #ff0;
    --terminal-bg: #000;
    --terminal-text: #0f0;
    --terminal-border: #0f0;
    --accent-color: #00ff41;
    --danger-color: #ff2d00;
    --warning-color: #ffaa00;
}

html {
    height: 100%;
}

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: var(--neon-green);
    overflow-x: hidden;
    min-height: 100vh;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* CRT and Scan Lines Effect */
.crt-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background:
        radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
    animation: crt-flicker 0.15s infinite;
}

.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.05) 0px,
        rgba(0, 255, 0, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scanlines 8s linear infinite;
}

@keyframes crt-flicker {
    0% { opacity: 0.97; }
    50% { opacity: 0.99; }
    100% { opacity: 0.98; }
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* Matrix Background Effect */
.matrix-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.45;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 14px;
    white-space: nowrap;
    color: var(--neon-green);
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.8);
    animation: matrix-fall linear infinite;
}

.matrix-column.cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
}

.matrix-column .matrix-char {
    display: block;
    opacity: 0;
    animation: matrix-fade 2s ease-in-out infinite;
}

@keyframes matrix-fall {
    0% {
        top: -100%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes matrix-fade {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 1;
    }
}

/* Background Animations */
.bg-animations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.1;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* Header */
.site-header {
    flex-shrink: 0;
    padding: 20px 0;
    border-bottom: 2px solid var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    background: #000;
    position: sticky;
    top: 0;
    z-index: 9997;
    isolation: isolate;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: -1;
}

.site-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.logo-3d {
    width: 300px;
    height: auto;
    max-height: 100px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.8));
    transition: all 0.3s ease;
}

.logo-3d:hover {
    filter: drop-shadow(0 0 20px rgba(0, 255, 0, 1)) drop-shadow(0 0 30px rgba(0, 255, 255, 0.5));
    transform: scale(1.05);
}

/* Legacy logo support */
.logo-svg {
    width: 200px;
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.8));
}

/* Navigation - Electronic Chip Style */
.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 50px;
    padding: 0 25px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: var(--neon-green);
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    border: 2px solid var(--neon-green);
    border-radius: 4px;
    box-shadow:
        0 0 10px rgba(0, 255, 0, 0.3),
        inset 0 0 5px rgba(0, 255, 0, 0.1);
    transition: all 0.3s ease;
    overflow: visible;
}

/* Chip pins on left side */
.nav-link::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 80%;
    background: repeating-linear-gradient(
        0deg,
        var(--neon-green) 0px,
        var(--neon-green) 3px,
        transparent 3px,
        transparent 8px
    );
    opacity: 0.8;
}

/* Chip pins on right side */
.nav-link::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 80%;
    background: repeating-linear-gradient(
        0deg,
        var(--neon-green) 0px,
        var(--neon-green) 3px,
        transparent 3px,
        transparent 8px
    );
    opacity: 0.8;
}

/* Chip notch indicator at top */
.nav-link > span {
    position: relative;
    display: inline-block;
}

.nav-link > span::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    border: 2px solid var(--neon-green);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    opacity: 0.6;
}

/* Chip label/code at bottom */
.nav-link > span::after {
    content: 'CZ-IC';
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6px;
    letter-spacing: 0.5px;
    color: var(--neon-green);
    opacity: 0.4;
    white-space: nowrap;
}

.nav-link:hover {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.6),
        inset 0 0 10px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    transform: translateY(-2px);
}

.nav-link:hover::before,
.nav-link:hover::after {
    background: repeating-linear-gradient(
        0deg,
        var(--neon-cyan) 0px,
        var(--neon-cyan) 3px,
        transparent 3px,
        transparent 8px
    );
    opacity: 1;
}

.nav-link:hover > span::before {
    border-color: var(--neon-cyan);
    opacity: 1;
}

.nav-link:hover > span::after {
    color: var(--neon-cyan);
    opacity: 0.6;
}

.nav-link.active {
    background: linear-gradient(135deg, #0a2a0a 0%, #051505 100%);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow:
        0 0 25px rgba(0, 255, 255, 0.8),
        inset 0 0 15px rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 15px rgba(0, 255, 255, 1);
}

.nav-link.active::before,
.nav-link.active::after {
    background: repeating-linear-gradient(
        0deg,
        var(--neon-cyan) 0px,
        var(--neon-cyan) 3px,
        transparent 3px,
        transparent 8px
    );
    opacity: 1;
    animation: pulse-pins 2s ease-in-out infinite;
}

.nav-link.active > span::before {
    border-color: var(--neon-cyan);
    opacity: 1;
}

.nav-link.active > span::after {
    color: var(--neon-cyan);
    opacity: 0.7;
}

@keyframes pulse-pins {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Main Content */
.main-content {
    flex: 1 0 auto;
    padding: 0;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
}

.main-content .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    animation: fadeIn 0.5s ease;
}

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

/* Terminal Window */
.terminal-window {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid var(--neon-green);
    box-shadow:
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    margin-bottom: 30px;
    animation: terminal-boot 0.8s ease;
}

@keyframes terminal-boot {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.terminal-header {
    background: rgba(0, 255, 0, 0.1);
    padding: 10px 15px;
    border-bottom: 2px solid var(--neon-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.terminal-controls {
    display: flex;
    gap: 10px;
}

.control {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--neon-green);
    cursor: pointer;
    transition: all 0.3s;
}

.control:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 10px var(--neon-green);
}

.terminal-content {
    padding: 30px;
}

/* ASCII Art */
.ascii-art {
    color: var(--neon-cyan);
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Glitch Text Effect */
.glitch-text h1 {
    font-size: 32px;
    text-align: center;
    margin: 20px 0;
    color: var(--neon-green);
    text-shadow:
        0 0 10px rgba(0, 255, 0, 0.8),
        0 0 20px rgba(0, 255, 0, 0.6);
    animation: glitch 3s infinite;
    position: relative;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
    98% {
        transform: translate(2px, 2px);
    }
}

/* Terminal Text */
.terminal-text {
    font-size: 16px;
    line-height: 1.8;
    margin: 20px 0;
}

/* Blinking Cursor */
.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--neon-green);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    color: #000;
    box-shadow:
        0 0 20px rgba(0, 255, 0, 0.8),
        inset 0 0 20px rgba(0, 255, 0, 0.5);
    text-shadow: none;
}

.btn-primary {
    border-color: var(--neon-green);
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

.btn-primary::before {
    background: var(--neon-green);
}

.btn-secondary {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.btn-secondary::before {
    background: var(--neon-cyan);
}

.btn-icon {
    margin-right: 8px;
}

/* Stats Panel */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--neon-cyan);
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.stat-label {
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--neon-cyan);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
}

.status-online {
    color: var(--accent-color);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Forms */
.cyber-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--neon-cyan);
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    font-family: 'Courier New', monospace;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.5),
        inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.form-message {
    min-height: 30px;
    margin: 15px 0;
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

.form-message.error {
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    background: rgba(255, 45, 0, 0.1);
}

.form-message.success {
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    background: rgba(0, 255, 65, 0.1);
}

/* Section Titles */
.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    letter-spacing: 3px;
}

/* About Content */
.about-content {
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 15px;
}

.about-content h3 {
    color: var(--neon-cyan);
    margin: 20px 0 10px;
    font-size: 18px;
    letter-spacing: 2px;
}

.feature-list {
    list-style: none;
    margin: 10px 0 20px 20px;
}

.feature-list li {
    margin: 8px 0;
    padding-left: 10px;
}

/* Footer */
.site-footer {
    flex-shrink: 0;
    border-top: 2px solid var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.terminal-prompt {
    color: var(--neon-cyan);
    margin-right: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header {
        padding: 15px 0;
    }

    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .logo-3d {
        width: 220px;
        max-height: 70px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        max-width: 100%;
        padding: 0 10px;
    }

    .nav-link {
        min-width: 110px;
        height: 45px;
        font-size: 10px;
        padding: 0 15px;
        letter-spacing: 1px;
    }

    .nav-link::before,
    .nav-link::after {
        width: 6px;
        left: -6px;
    }

    .nav-link::after {
        right: -6px;
        left: auto;
    }

    .nav-link > span::before {
        width: 10px;
        height: 5px;
        top: -23px;
    }

    .nav-link > span::after {
        font-size: 5px;
        bottom: -15px;
    }

    .main-content {
        margin-top: 15px;
    }

    .main-content .container {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .ascii-art {
        font-size: 6px;
    }

    .glitch-text h1 {
        font-size: 24px;
    }
}

/* Circuit Board Pattern (decorative) */
.terminal-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Settings Section */
.settings-group {
    padding: 20px;
    border: 2px solid rgba(0, 255, 0, 0.3);
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    border-radius: 4px;
}

.settings-group h3 {
    font-size: 16px;
    letter-spacing: 2px;
}

/* Volume Controls - Inline Version */
.volume-control-inline {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 255, 0, 0.05);
    border: 2px solid rgba(0, 255, 0, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.volume-control-inline:hover {
    background: rgba(0, 255, 0, 0.08);
    border-color: rgba(0, 255, 0, 0.4);
}

.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 6px;
    background: rgba(0, 255, 0, 0.2);
    outline: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.volume-slider:hover {
    background: rgba(0, 255, 0, 0.3);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--neon-green);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 1);
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--neon-green);
    cursor: pointer;
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    background: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 1);
    transform: scale(1.2);
}

.volume-value {
    color: var(--neon-cyan);
    font-size: 14px;
    font-weight: bold;
    min-width: 30px;
    text-align: right;
}

.mute-btn {
    background: none;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.mute-btn:hover {
    background: rgba(0, 255, 0, 0.2);
    border-color: var(--neon-cyan);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.mute-btn:active {
    transform: scale(0.95);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 0, 0, 0.3);
    border: 2px solid #ff0000;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #ff0000;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.8);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: rgba(0, 255, 0, 0.3);
    border-color: var(--neon-green);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(30px);
    background-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 0, 1);
}

.toggle-slider:hover {
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Mobile adjustments for inline volume control */
@media (max-width: 768px) {
    .volume-control-inline {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .volume-slider {
        width: 100%;
        max-width: 200px;
    }

    .volume-slider-container {
        width: 100%;
        justify-content: center;
    }

    .settings-group {
        padding: 15px;
    }
}

/* ===== GAME WINDOW ===== */

/* Game Window Container */
.game-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    overflow: hidden;
}

/* Game Canvas */
#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    cursor: crosshair;
}

/* Menu Toggle Button */
.menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    font-size: 24px;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.menu-toggle:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
    transform: scale(1.05);
}

.menu-toggle .menu-icon {
    display: block;
    line-height: 1;
}

/* User Profile Toggle (replaces burger menu) */
.user-profile-toggle {
    width: auto;
    min-width: 180px;
    height: 50px;
    padding: 5px 15px;
    gap: 10px;
    justify-content: flex-start;
}

.menu-avatar {
    width: 40px;
    height: 40px;
    border: 2px solid var(--neon-cyan);
    border-radius: 4px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.menu-username {
    color: var(--neon-green);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-chevron {
    color: var(--neon-cyan);
    font-size: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Sliding Menu */
.sliding-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    border-right: 2px solid var(--neon-green);
    z-index: 10003;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.sliding-menu.open {
    left: 0;
}

/* Menu Header */
.menu-header {
    padding: 20px;
    border-bottom: 2px solid var(--neon-green);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 255, 0, 0.05);
}

.menu-logo {
    height: 40px;
    width: auto;
}

.menu-close {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    font-size: 24px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.menu-close:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 10px var(--neon-green);
}

/* Menu Navigation */
.menu-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--neon-green);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    gap: 15px;
}

.menu-link:hover {
    background: rgba(0, 255, 0, 0.1);
    border-left-color: var(--neon-cyan);
    padding-left: 30px;
}

.menu-link.active {
    background: rgba(0, 255, 0, 0.15);
    border-left-color: var(--neon-green);
    font-weight: bold;
}

.menu-link .menu-icon {
    font-size: 18px;
    width: 24px;
    display: inline-block;
}

/* Menu Footer */
.menu-footer {
    padding: 20px;
    border-top: 2px solid var(--neon-green);
    background: rgba(0, 255, 0, 0.05);
}

.menu-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-small {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--neon-green);
}

.stat-small .stat-label {
    opacity: 0.7;
}

.stat-small .stat-value {
    font-weight: bold;
}

/* Hide main content and header when game is active */
body.game-active .site-header,
body.game-active .main-content,
body.game-active .site-footer,
body.game-active .matrix-background,
body.game-active .bg-animations {
    display: none !important;
}

body.game-active {
    overflow: hidden;
}

/* Mobile adjustments for game window */
@media (max-width: 768px) {
    .menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 15px;
        left: 15px;
    }

    .sliding-menu {
        width: 280px;
        left: -280px;
    }

    .menu-logo {
        height: 30px;
    }

    .menu-link {
        font-size: 14px;
        padding: 12px 15px;
    }

    .menu-link:hover {
        padding-left: 20px;
    }
}

/* ===== GAME OVERLAY WINDOWS ===== */

/* Overlay Background */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10004;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Overlay Content Container */
.game-overlay-content {
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: overlaySlideIn 0.3s ease;
}

@keyframes overlaySlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Overlay Terminal Window */
.game-overlay .terminal-window {
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5), 0 0 60px rgba(0, 255, 0, 0.2);
}

/* Overlay Close Button */
.overlay-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.3s ease;
}

.overlay-close:hover {
    color: var(--danger-color);
    text-shadow: 0 0 10px var(--danger-color);
    transform: scale(1.2);
}

/* Overlay Scrollbar Styling */
.game-overlay-content::-webkit-scrollbar {
    width: 10px;
}

.game-overlay-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--neon-green);
}

.game-overlay-content::-webkit-scrollbar-thumb {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.game-overlay-content::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
}

/* Mobile adjustments for overlays */
@media (max-width: 768px) {
    .game-overlay-content {
        width: 95%;
        max-height: 90vh;
    }

    .game-overlay .terminal-content {
        padding: 15px;
    }

    .game-overlay .settings-group {
        padding: 15px;
    }
}

/* ===== PROFILE PAGE ===== */

/* Profile Section */
.profile-section {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 255, 0, 0.05);
    border: 2px solid rgba(0, 255, 0, 0.2);
    border-radius: 4px;
}

/* Avatar Container */
.profile-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 128px;
    height: 128px;
    border: 3px solid var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background: #000;
}

.avatar-upload-overlay {
    position: absolute;
    bottom: -10px;
    right: -10px;
}

.avatar-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 0, 0.9);
    border: 2px solid var(--neon-green);
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.avatar-upload-btn:hover {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Profile Info */
.profile-info {
    flex: 1;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin: 5px 0;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--neon-green);
}

.info-label {
    color: #888;
    font-size: 12px;
}

.info-value {
    color: var(--neon-green);
    font-weight: bold;
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    padding: 20px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.stat-box-label {
    color: #888;
    font-size: 11px;
    margin-bottom: 10px;
}

.stat-box-value {
    color: var(--neon-cyan);
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Profile Settings Summary */
.profile-settings-summary {
    padding: 20px;
    background: rgba(255, 0, 255, 0.05);
    border: 2px solid rgba(255, 0, 255, 0.2);
    border-radius: 4px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--neon-pink);
}

.setting-label {
    color: #888;
    font-size: 13px;
}

.setting-value {
    color: var(--neon-pink);
    font-weight: bold;
}

/* Mobile adjustments for profile */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-info {
        width: 100%;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-row {
        flex-direction: column;
        gap: 5px;
    }

    /* Compact menu toggle on mobile */
    .user-profile-toggle {
        min-width: 140px;
        padding: 5px 10px;
    }

    .menu-username {
        font-size: 12px;
        max-width: 60px;
    }

    .menu-chevron {
        font-size: 10px;
    }
}
