/* Modern Cyberpunk Design */

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

:root {
    --primary: #00d4ff;
    --secondary: #ff0080;
    --accent: #00ff88;
    --dark: #0a0a0f;
    --darker: #050508;
    --light: #ffffff;
    --gray: #8892b0;
    --glow: rgba(0, 212, 255, 0.4);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% { 
        background: 
            radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(255, 0, 128, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    }
    50% { 
        background: 
            radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.15) 0%, transparent 60%),
            radial-gradient(circle at 20% 80%, rgba(255, 0, 128, 0.15) 0%, transparent 60%),
            radial-gradient(circle at 60% 60%, rgba(0, 255, 136, 0.08) 0%, transparent 60%);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Cyber Navigation */
.cyber-nav {
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--primary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--glow);
    animation: brandGlow 3s ease-in-out infinite alternate;
}

@keyframes brandGlow {
    0% { text-shadow: 0 0 10px var(--glow), 0 0 20px var(--primary); }
    100% { text-shadow: 0 0 15px var(--glow), 0 0 30px var(--primary), 0 0 40px var(--primary); }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-dropdown {
    position: relative;
}

.nav-main {
    color: var(--gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: block;
}

.nav-main:hover,
.nav-main.active {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--glow);
    animation: navPulse 2s ease-in-out infinite;
}

@keyframes navPulse {
    0%, 100% { box-shadow: 0 0 10px var(--glow); }
    50% { box-shadow: 0 0 20px var(--glow), 0 0 30px var(--primary); }
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    background: rgba(5, 5, 8, 0.95);
    border: 1px solid var(--primary);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

/* Main */
.main-content {
    padding-top: 0;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Change to column for mobile responsiveness */
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Prominent Portfolio CTA positioned near top of hero */
.hero-cta {
    position: absolute;
    top: 45px; /* moved 50% closer to nav (was 90px) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.portfolio-btn {
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border: none;
    color: var(--dark);
    padding: 1.25rem 2.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(255, 0, 128, 0.12), 0 0 40px rgba(0, 212, 255, 0.08);
}

.portfolio-btn:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.05);
    box-shadow: 0 14px 40px rgba(255, 0, 128, 0.18), 0 0 60px rgba(0, 212, 255, 0.12);
}

@media (max-width: 768px) {
    .hero-cta {
        position: static;
        margin-bottom: 1rem;
        display: flex;
        justify-content: center;
    }

    .portfolio-btn {
        width: 90%;
        padding: 0.9rem 1.5rem;
        border-radius: 10px;
        font-size: 0.95rem;
    }
}

.hero-content {
    text-align: center;
    max-width: 100%;
    width: 100%;
    padding: 0 2rem;
    box-sizing: border-box;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    opacity: 0.1;
    filter: blur(20px);
    z-index: -1;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 3rem;
}

/* Access Panel */
.access-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.scanner {
    width: 120px;
    height: 120px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(0, 212, 255, 0.05);
}

.scanner::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: conic-gradient(var(--primary), var(--secondary), var(--accent), var(--primary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scanner:hover::before {
    opacity: 1;
}

.scanner:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--glow);
    animation: scannerPulse 1s ease-in-out infinite;
}

@keyframes scannerPulse {
    0%, 100% { box-shadow: 0 0 30px var(--glow); }
    50% { box-shadow: 0 0 50px var(--glow), 0 0 70px var(--primary); }
}

.scanner-inner {
    color: var(--primary);
    transition: all 0.3s ease;
}

.scanner:hover .scanner-inner {
    color: var(--accent);
    transform: rotate(180deg);
}

.access-text {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.access-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.access-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.access-btn:hover::before {
    left: 100%;
}

.access-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-2px);
}

/* Features */
.features {
    padding: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.feature:hover::before {
    left: 100%;
}

.feature:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.feature p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Page Header */
.page-header {
    text-align: center;
    margin: 3rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Matrix Styles */
.matrix-container {
    position: relative;
    margin-top: 2rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
}

#matrixCanvas {
    display: block;
    background: #000;
    width: 100%;
    height: 500px;
}

.matrix-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--primary);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

/* Data Styles */
.data-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.data-panel {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 1.5rem;
}

.data-panel:last-child {
    grid-column: 1 / -1;
}

.data-panel h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-label {
    min-width: 80px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
}

.metric-bar {
    flex: 1;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--primary);
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    width: 0%;
    transition: width 0.5s ease;
}

.metric-value {
    min-width: 50px;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

.stream-container, .log-container {
    height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.stream-line {
    color: var(--accent);
    margin: 0.25rem 0;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.log-entry {
    margin: 0.25rem 0;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.log-time {
    color: var(--primary);
}

/* Network Styles */
.network-container {
    margin-top: 2rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.7);
}

#networkCanvas {
    display: block;
    background: rgba(0, 0, 0, 0.9);
    width: 100%;
    height: 500px;
}

.network-controls {
    padding: 1rem;
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--primary);
}

.network-info {
    padding: 1rem;
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--primary);
    background: rgba(0, 0, 0, 0.5);
}

.info-item {
    display: flex;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
}

.info-item span:last-child {
    color: var(--accent);
    font-weight: 600;
}

/* About NEXUS Section */
.about-nexus {
    padding: 5rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.about-nexus h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 3rem;
    font-family: 'JetBrains Mono', monospace;
}

.nexus-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.info-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* News Feed Section */
.news-feed {
    padding: 5rem 0;
}

.news-feed h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 3rem;
    font-family: 'JetBrains Mono', monospace;
}

.news-container {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    background: rgba(0, 0, 0, 0.7);
    border-left: 4px solid var(--secondary);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.news-item:hover {
    background: rgba(255, 0, 128, 0.1);
    transform: translateX(5px);
}

.news-time {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.news-item h4 {
    color: var(--secondary);
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.news-item p {
    color: var(--gray);
    line-height: 1.5;
}

/* User Profile Section */
.user-profile {
    padding: 5rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.user-profile h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 3rem;
    font-family: 'JetBrains Mono', monospace;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-info h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.stat-info span {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Terminal Styles */
.terminal-window {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.terminal-header {
    background: rgba(0, 212, 255, 0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray);
}

.control:nth-child(1) { background: #ff5f56; }
.control:nth-child(2) { background: #ffbd2e; }
.control:nth-child(3) { background: #27ca3f; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    font-size: 0.9rem;
}

.terminal-body {
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    min-height: 300px;
}

.terminal-output {
    margin-bottom: 1rem;
    max-height: 250px;
    overflow-y: auto;
}

.line {
    color: var(--accent);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.prompt {
    color: var(--primary);
}

.cursor {
    animation: blink 1s infinite;
}

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

@keyframes fadeIn {
    to { opacity: 1; }
}

.terminal-input-area {
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    padding-top: 1rem;
}

.input-prompt {
    color: var(--primary);
    margin-right: 0.5rem;
}

.terminal-input {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    outline: none;
    flex: 1;
}

.quick-commands {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
}

.quick-commands h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.cmd-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.cmd-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 10px var(--glow);
}

/* Games Styles */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-difficulty {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.game-difficulty.easy { background: var(--accent); color: var(--dark); }
.game-difficulty.medium { background: var(--primary); color: var(--dark); }
.game-difficulty.hard { background: var(--secondary); color: var(--light); }

.game-area {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.game-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.game-btn:hover {
    background: rgba(0, 212, 255, 0.1);
}

#gameCanvas {
    border: 1px solid var(--primary);
    background: var(--darker);
    margin-bottom: 1rem;
}

.game-instructions {
    color: var(--gray);
    font-family: 'JetBrains Mono', monospace;
}

/* RPG Styles */
.rpg-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.rpg-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.tts-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--primary);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tts-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.rpg-output {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 1rem;
    height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.rpg-message {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.rpg-input-area {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.rpg-prompt {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    margin-right: 0.5rem;
}

.rpg-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary);
    color: var(--light);
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.rpg-input:focus {
    outline: none;
    box-shadow: 0 0 10px var(--glow);
}

.rpg-stats {
    display: flex;
    gap: 2rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    font-size: 0.9rem;
}

/* Victory Page Styles */
.victory-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.victory-container {
    max-width: 800px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--accent);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.3);
}

.victory-title {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px var(--accent);
}

.victory-subtitle {
    font-size: 1.5rem;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.achievement-card {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.achievement-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.achievement-card h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.victory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.victory-stats .stat-item {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.victory-stats .stat-label {
    color: var(--secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.victory-stats .stat-value {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
}

.victory-message {
    background: rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.victory-message p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.victory-rewards {
    background: rgba(255, 0, 128, 0.1);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.victory-rewards h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.reward-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.reward-item {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.victory-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.victory-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.victory-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px var(--glow);
    transform: translateY(-2px);
}

.victory-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.victory-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: victoryFloat 5s linear infinite;
}

@keyframes victoryFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes victoryGlow {
    0% {
        text-shadow: 0 0 20px var(--accent);
    }
    100% {
        text-shadow: 0 0 40px var(--accent), 0 0 60px var(--accent);
    }
}

/* Music Player Styles */
.music-player {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .music-player {
        padding: 1rem;
    }
    
    #visualizer {
        width: 100%;
        height: 150px;
    }
    
    .controls {
        gap: 0.5rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .control-btn.play {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .track-list {
        gap: 0.25rem;
    }
    
    .track {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .track-name {
        margin-left: 0.5rem;
    }
}

.visualizer {
    text-align: center;
    margin-bottom: 2rem;
}

#visualizer {
    border: 1px solid rgba(0, 212, 255, 0.2);
    background: var(--darker);
}

.player-controls {
    text-align: center;
}

.track-info {
    margin-bottom: 2rem;
}

.track-info h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.track-info p {
    color: var(--gray);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.control-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.1);
}

.control-btn.play {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 2px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary);
    width: 30%;
    transition: width 0.3s ease;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-family: 'JetBrains Mono', monospace;
}

.playlist {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
}

.playlist h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.track:hover,
.track.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
}

.track-number {
    color: var(--gray);
    font-family: 'JetBrains Mono', monospace;
    width: 30px;
}

.track-name {
    flex: 1;
    text-align: left;
    margin-left: 1rem;
}

.track-duration {
    color: var(--gray);
    font-family: 'JetBrains Mono', monospace;
}

/* Hacker Interface Styles */
.hack-interface {
    display: grid;
    gap: 2rem;
}

.target-selection {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
}

.target-selection h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.targets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.target {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.target:hover {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
}

.target-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hack-progress {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    padding: 1.5rem;
}

.hack-progress h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.progress-container {
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--secondary);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 0.5rem;
}

.hack-log {
    background: var(--darker);
    border: 1px solid rgba(255, 0, 128, 0.2);
    border-radius: 4px;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--secondary);
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
}

.hack-tools {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
}

.hack-tools h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.tool-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.tool-btn:hover {
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cyber-nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    .mobile-nav-toggle {
        display: block;
        align-self: flex-end;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-top: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-main {
        width: 100%;
        text-align: left;
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.8);
        margin-left: 1rem;
        display: none;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hero {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-desc {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .scanner {
        width: 100px;
        height: 100px;
    }
    
    .access-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .feature {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .nexus-info {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-dashboard {
        grid-template-columns: 1fr;
    }
    
    .network-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .matrix-controls {
        position: static;
        margin-top: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .control-buttons {
        justify-content: center;
    }
    
    #gameCanvas {
        width: 100%;
        height: 300px;
    }
    
    .rpg-container {
        padding: 1rem;
    }
    
    .rpg-output {
        height: 300px;
        font-size: 0.8rem;
    }
    
    .rpg-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .terminal-body {
        padding: 0.5rem;
        min-height: 200px;
    }
    
    .commands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hack-interface {
        gap: 1rem;
    }
    
    .targets {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .victory-container {
        padding: 2rem 1rem;
        margin: 1rem;
    }
    
    .victory-title {
        font-size: 2rem;
    }
    
    .victory-stats {
        grid-template-columns: 1fr;
    }
    
    .victory-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .status-bar {
        position: static;
        margin: 1rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-brand {
        font-size: 1rem;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .about-nexus h2,
    .news-feed h2,
    .user-profile h2 {
        font-size: 2rem;
    }
    
    .rpg-controls {
        justify-content: center;
    }
    
    .commands-grid {
        grid-template-columns: 1fr;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .feature, .game-card, .target, .tool-btn, .cmd-btn {
        transform: none;
        transition: background-color 0.2s ease;
    }
    
    .feature:active, .game-card:active {
        background: rgba(0, 212, 255, 0.2);
        transform: scale(0.98);
    }
    
    .nav-main, .dropdown-menu a {
        padding: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .control-btn, .game-btn, .access-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .rpg-input, .terminal-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Additional styles for missing components */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: -2;
}

.cyber-button, .tool-btn, .cmd-btn, .game-btn, .control-btn, .op-btn, .quick-btn, .mini-button {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
}

.cyber-button:hover, .tool-btn:hover, .cmd-btn:hover, .game-btn:hover, .control-btn:hover, .op-btn:hover, .quick-btn:hover, .mini-button:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 10px var(--glow);
}

.cyber-select, .mini-select {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
}

.cyber-input, .mini-input, .search-input, .ip-input {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary);
    color: var(--light);
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.cyber-input:focus, .mini-input:focus, .search-input:focus, .ip-input:focus {
    outline: none;
    box-shadow: 0 0 10px var(--glow);
}

.panel-header {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    font-family: 'JetBrains Mono', monospace;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.online, .online {
    background: var(--accent);
    color: var(--accent);
}

.status-dot.offline, .offline {
    background: var(--secondary);
    color: var(--secondary);
}

.positive {
    color: var(--accent);
}

.negative {
    color: var(--secondary);
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    animation: float 8s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Status Bar */
.status-bar {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary);
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    display: flex;
    gap: 1rem;
    z-index: 1000;
    border-radius: 4px;
}

.status-bar span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Glitch Effect */
.nav-brand {
    position: relative;
}

.nav-brand::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--secondary);
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% {
        clip: rect(42px, 9999px, 44px, 0);
        transform: skew(0.5deg);
    }
    5% {
        clip: rect(12px, 9999px, 59px, 0);
        transform: skew(0.1deg);
    }
    10% {
        clip: rect(85px, 9999px, 140px, 0);
        transform: skew(0.8deg);
    }
    15% {
        clip: rect(0, 0, 0, 0);
        transform: skew(0deg);
    }
    100% {
        clip: rect(0, 0, 0, 0);
        transform: skew(0deg);
    }
}

/* Data Stream Background */
.data-stream-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--primary);
    overflow: hidden;
}

.data-line {
    position: absolute;
    white-space: nowrap;
    animation: scrollData 15s linear infinite;
}

@keyframes scrollData {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Portfolio visuals: lift section and make cards pop */
.portfolio-section {
    margin-top: -6rem; /* pull the portfolio up toward the hero */
    position: relative;
    z-index: 30;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.project-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.35));
    border: 1px solid rgba(0,212,255,0.08);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0,212,255,0.02), rgba(255,0,128,0.02));
    pointer-events: none;
    mix-blend-mode: overlay;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 20px 60px rgba(0,212,255,0.08), 0 8px 30px rgba(255,0,128,0.06);
}

.project-thumb {
    width: 72px;
    height: 72px;
    font-size: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(255,0,128,0.04));
    color: var(--primary);
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--light);
}

.project-desc {
    color: var(--gray);
    margin-bottom: 1rem;
}

.project-open {
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border: none;
    color: var(--dark);
    padding: 0.65rem 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-open:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,212,255,0.08);
}

.project-meta { margin-top: 0.75rem; color: var(--gray); font-size: 0.9rem; }

/* emphasize NYX login info */
#nyx-card .project-meta + div, #nyx-card > div[style] {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,0,128,0.06);
    padding: 0.6rem;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .portfolio-section { margin-top: -2rem; }
    .project-thumb { width: 56px; height: 56px; font-size: 1.6rem; }
    .projects-grid { gap: 1rem; }
}
/* Removed earlier experimental "fancy" jazz; restored simpler card visuals. */



/* Alert System */
.alert-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    pointer-events: none;
}

.system-alert {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--secondary);
    border-left: 4px solid var(--secondary);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--secondary);
    animation: alertSlide 0.5s ease, alertFade 4s ease;
    max-width: 300px;
}

@keyframes alertSlide {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes alertFade {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Typewriter Effect */
.typewriter-text {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 4s steps(100, end);
}

@keyframes typing {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Screen Flicker */
body {
    animation: screenFlicker 0.15s infinite linear alternate;
}

@keyframes screenFlicker {
    0% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.98; }
    100% { opacity: 1; }
}