/* --- CSS variables & Design System --- */
:root {
    --bg-color: #02040a; /* Premium dark black-blue */
    --bg-card: rgba(5, 8, 20, 0.75); /* Sleek black-blue glass panel */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(61, 94, 255, 0.25); /* Electric blue border glow */
    
    /* Theme Colors (Blue #00116F, White, Black) */
    --neon-cyan: #3d5eff;
    --neon-cyan-rgb: 61, 94, 255;
    --neon-purple-rgb: 0, 17, 111; /* Electric blue for glows and text readability */
    --neon-purple: #00116F; /* Deep Royal Blue (Main Brand Color) */
    --neon-pink: #ffffff; /* Swapped to Pure White */
    --neon-green: #3DDC84;
    --neon-blue: #00116F; /* Swapped to main deep blue */
    --neon-orange: #ff5555;
    
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1; /* Slate white secondary */
    --text-muted: #64748b;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}

a:focus, button:focus, input:focus, select:focus, textarea:focus,
a:active, button:active, div:focus, div:active, span:focus, span:active,
.nav-link:focus, .nav-link:active, .social-card:focus, .social-card:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Canvas Background */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
}

.glass-panel > * {
    position: relative;
    z-index: 2;
}

/* Sticky Capsule Header */
.header {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    padding: 0.4rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(7, 20, 41, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.logo a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
}

.logo-accent {
    color: var(--neon-cyan);
}

.nav {
    display: flex;
    gap: 0.1rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.15rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.55rem;
    border-radius: 20px;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (max-width: 360px) {
    .header {
        padding: 0.35rem 0.6rem;
        width: 94%;
    }
    .logo a {
        font-size: 0.95rem;
    }
    .nav-link {
        padding: 0.35rem 0.45rem;
        font-size: 0.8rem;
    }
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-normal);
}

.nav-link.active {
    color: #ffffff !important;
}

.nav-link.active::before {
    opacity: 1;
}

/* Sections */
.main-content {
    margin-top: 80px;
}

.section {
    padding: 3rem 5% 2rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-wrap: balance;
}

.title-underline {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.75rem;
}

.hero-visual {
    width: 100%;
    display: flex;
    justify-content: center;
}

.cyber-frame {
    position: relative;
    width: 250px;
    aspect-ratio: 1;
    border-radius: 20px;
    padding: 6px;
    background: linear-gradient(135deg, rgba(var(--neon-cyan-rgb), 0.2), rgba(var(--neon-cyan-rgb), 0.2));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    will-change: transform;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
    background: radial-gradient(circle, rgba(14, 27, 53, 0.8) 0%, rgba(2, 8, 19, 0.95) 100%);
    padding: 0.4rem;
}

.corner-bracket {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--neon-cyan);
    border-style: solid;
    pointer-events: none;
}

.top-left { top: 0; left: 0; border-width: 3px 0 0 3px; border-top-left-radius: 20px; }
.top-right { top: 0; right: 0; border-width: 3px 3px 0 0; border-top-right-radius: 20px; }
.bottom-left { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-bottom-left-radius: 20px; }
.bottom-right { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-bottom-right-radius: 20px; }

.status-overlay {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f0c1b;
    border: 1px solid var(--border-glow);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    z-index: 10;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--neon-green);
}

.status-text {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    color: var(--text-secondary);
}

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

.badge-container {
    align-self: center;
}

.badge {
    background: rgba(61, 220, 132, 0.12);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    text-wrap: balance;
}

.text-glow {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-secondary);
}

#typewriter {
    color: var(--neon-pink);
    white-space: nowrap;
}

.cursor {
    color: var(--neon-pink);
    animation: blink 0.8s infinite;
}

.hero-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    color: #fff;
    border: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Embedded Lofi Player wrapper */
.lofi-player-wrapper {
    width: 100%;
    margin-top: 1rem;
    max-width: 320px;
}

.lofi-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(var(--neon-cyan-rgb), 0.20);
    width: 100%;
    will-change: transform;
}

.player-disc-wrapper {
    position: relative;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-disc {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at center, var(--neon-cyan) 3%, transparent 4%),
        radial-gradient(circle at center, #020813 14%, transparent 15%),
        repeating-radial-gradient(
            circle at center,
            #111726,
            #111726 1px,
            #0a0f1d 2px,
            #111726 3px
        );
    border: 2px solid #1e293b;
    position: relative;
    animation: rotate 12s linear infinite;
    animation-play-state: paused;
    will-change: transform;
}

.playing .player-disc {
    animation-play-state: running;
    border-color: rgba(var(--neon-cyan-rgb), 0.5);
}

.vinyl-label {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-label-center {
    width: 5px;
    height: 5px;
    background: #020813;
}

.player-needle {
    position: absolute;
    top: -4px;
    right: -1px;
    width: 18px;
    height: 32px;
    pointer-events: none;
    z-index: 10;
    transform-origin: 14px 3px;
    transform: rotate(-15deg);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.playing .player-needle {
    transform: rotate(18deg);
}

.needle-hub {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #475569;
    border: 1px solid #94a3b8;
}

.needle-arm {
    position: absolute;
    top: 4px;
    right: 2px;
    width: 2px;
    height: 22px;
    background: linear-gradient(to bottom, #94a3b8, #475569);
    transform: rotate(10deg);
    transform-origin: top center;
}

.needle-cartridge {
    position: absolute;
    bottom: -2px;
    left: -1px;
    width: 4px;
    height: 6px;
    background: var(--neon-cyan);
}

.player-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    gap: 0.1rem;
}

.player-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(var(--neon-cyan-rgb), 0.85);
}

.deck-model {
    background: rgba(var(--neon-cyan-rgb), 0.08);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--neon-cyan);
}

.blink-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--neon-cyan);
    display: inline-block;
}

.playing .blink-dot {
    animation: blink 1s steps(2, start) infinite;
}

.player-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.player-artist {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.player-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-pause-btn {
    width: 30px;
    height: 30px;
    background: rgba(var(--neon-cyan-rgb), 0.08);
    border: 1px solid rgba(var(--neon-cyan-rgb), 0.4);
    color: var(--neon-cyan);
}

.playing .play-pause-btn {
    background: rgba(var(--neon-cyan-rgb), 0.1);
    border-color: rgba(var(--neon-cyan-rgb), 0.5);
    color: var(--neon-purple);
}

.player-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.player-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-blue) 0%, var(--neon-cyan) 100%);
    border-radius: 2px;
}

.visualizer {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 10px;
    opacity: 0.65;
}

.playing .visualizer {
    opacity: 1;
}

.visualizer .bar {
    width: 1.5px;
    height: 2px;
    background: linear-gradient(to top, var(--neon-blue), var(--neon-cyan));
    animation: bounce 1s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.playing .visualizer .bar {
    animation-play-state: running;
}

.visualizer .bar:nth-child(1) { height: 2px; animation-duration: 0.75s; --max-h: 7px; }
.visualizer .bar:nth-child(2) { height: 2px; animation-duration: 1.05s; --max-h: 9px; }
.visualizer .bar:nth-child(3) { height: 2px; animation-duration: 0.85s; --max-h: 6px; }
.visualizer .bar:nth-child(4) { height: 2px; animation-duration: 1.25s; --max-h: 10px; }
.visualizer .bar:nth-child(5) { height: 2px; animation-duration: 0.95s; --max-h: 8px; }
.visualizer .bar:nth-child(6) { height: 2px; animation-duration: 1.15s; --max-h: 9px; }
.visualizer .bar:nth-child(7) { height: 2px; animation-duration: 0.8s; --max-h: 6px; }
.visualizer .bar:nth-child(8) { height: 2px; animation-duration: 1.0s; --max-h: 8px; }

/* About Me */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.about-text-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-text-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--neon-cyan);
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.7rem;
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

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

.skill-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.skill-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.skill-img-icon {
    width: 32px;
    height: 32px;
}

.skill-info h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.skill-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Projects */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.filter-btn.active {
    color: #fff;
    background: rgba(var(--neon-cyan-rgb), 0.15);
    border-color: var(--neon-purple);
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2.5 / 1;
    height: auto;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-placeholder-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gradient-anime {
    background: linear-gradient(135deg, #061e38 0%, #0c3866 100%);
    border-bottom: 2px solid var(--neon-cyan);
}

.project-icon-placeholder {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.project-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.project-badge.github {
    background: rgba(var(--neon-cyan-rgb), 0.15);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
}

.project-badge.playstore {
    background: rgba(61, 220, 132, 0.15);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
}

.project-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.project-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-wrap: pretty;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-project {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    flex-grow: 1;
}

.btn-source {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-chplay.disabled {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Socials */
.socials-intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-wrap: pretty;
}

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

.social-card {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    gap: 0.75rem;
}

.social-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
}

.social-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.social-info {
    z-index: 2;
    flex-grow: 1;
}

.social-info h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
}

.social-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.social-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    z-index: 2;
}

.facebook-theme .social-card-bg { background: linear-gradient(135deg, rgba(24, 119, 242, 0.05), transparent); opacity: 1; }
.steam-theme .social-card-bg { background: linear-gradient(135deg, rgba(var(--neon-cyan-rgb), 0.05), transparent); opacity: 1; }
.github-theme .social-card-bg { background: linear-gradient(135deg, rgba(var(--neon-cyan-rgb), 0.05), transparent); opacity: 1; }
.email-theme .social-card-bg { background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent); opacity: 1; }

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 5%;
    text-align: center;
    background: rgba(5, 8, 20, 0.85);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.text-pink {
    color: var(--neon-pink);
}

/* Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0% { height: 2px; }
    100% { height: var(--max-h, 8px); }
}

/* --- RETRO ARCADE MODAL & CARD (MOBILE) --- */
.retro-arcade-bg {
    background: radial-gradient(circle at center, #0b113a 0%, #02040a 100%);
    position: relative;
    overflow: hidden;
}
.retro-arcade-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    opacity: 0.8;
}
.arcade-glow-icon {
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 15px var(--neon-cyan));
    animation: floatArcade 4s ease-in-out infinite;
}
@keyframes floatArcade {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
}
.project-badge.arcade {
    background: var(--neon-cyan);
    color: #fff;
    box-shadow: 0 0 10px rgba(var(--neon-cyan-rgb), 0.4);
}
.btn-arcade-play {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(var(--neon-cyan-rgb), 0.3);
}
.btn-arcade-play:active {
    transform: scale(0.98);
    filter: brightness(1.1);
}

/* Modal wrapper on mobile (Full Screen) */
.arcade-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: #000000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.arcade-modal.show {
    display: flex;
    opacity: 1;
}
.arcade-modal-content {
    background: #000;
    width: 100%;
    height: 100%;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.arcade-close-btn {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 2.2rem;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    cursor: pointer;
    z-index: 100000; /* Ensure it is clickable over game touch controls */
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.arcade-close-btn:active {
    background: rgba(255, 85, 85, 0.8);
}
.arcade-header {
    display: none; /* Hide header details on mobile to save precious screen space */
}
.arcade-game-container {
    width: 100%;
    height: 100%;
    background: #000;
}
.arcade-game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Dedicated Arcade Section Styles (Mobile) */
.arcade-section {
    position: relative;
    padding: 3.5rem 0;
}

.arcade-container {
    padding: 0 1.25rem;
}

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

.arcade-title {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #ffffff 40%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.arcade-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.arcade-note-inline {
    display: block;
    margin-top: 0.25rem;
    color: var(--neon-cyan);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(var(--neon-cyan-rgb), 0.25);
}

.arcade-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    width: 100%;
    box-sizing: border-box;
}

.game-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card-visual {
    position: relative;
    height: 130px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.game-screen-mockup {
    width: 100%;
    height: 100%;
    background: #000;
    position: relative;
    overflow: hidden;
}

.game-screen-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(61, 94, 255, 0.15) 0%, rgba(0, 0, 0, 0) 80%);
    pointer-events: none;
    z-index: 2;
}

.retro-arcade-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #0b113a 0%, #02040a 100%);
    position: relative;
}

.retro-arcade-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.04));
    background-size: 100% 4px, 6px 100%;
    opacity: 0.8;
}

.arcade-glow-icon {
    font-size: 2.5rem;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 10px var(--neon-cyan));
    animation: floatArcade 4s ease-in-out infinite;
}

.arcade-glow-icon.custom-glow {
    color: #a855f7;
    filter: drop-shadow(0 0 10px #a855f7);
}

.arcade-glow-icon.placeholder-glow {
    color: var(--text-muted);
    filter: none;
    opacity: 0.3;
}

.console-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
}

.console-badge.nes {
    background: #ff3e3e;
    color: #fff;
}

.console-badge.sega {
    background: #0066cc;
    color: #fff;
}

.console-badge.custom {
    background: #a855f7;
    color: #fff;
}

.console-badge.soon {
    background: var(--text-muted);
    color: var(--bg-dark);
    opacity: 0.7;
}

.game-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-title {
    font-size: 1.15rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.25rem 0;
}

.game-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}

.btn-play-game {
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #fff !important;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    box-shadow: 0 3px 8px rgba(var(--neon-cyan-rgb), 0.2);
}

.btn-play-game:active {
    transform: scale(0.97);
}

.btn-play-game.outline {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.btn-play-game.outline:active {
    background: rgba(var(--neon-cyan-rgb), 0.15);
}

.btn-play-game.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

.placeholder-card {
    opacity: 0.65;
    border-style: dashed;
}

@keyframes floatArcade {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.04); }
}

/* --- RETRO ARCADE SUB-TITLES & CUSTOM ROM LOADER (MOBILE) --- */
.arcade-sub-title {
    font-size: 1.1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #fff;
    margin-top: 0;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.arcade-sub-title i {
    color: var(--neon-cyan);
}

.custom-rom-section {
    margin-top: 2.5rem;
}

.custom-rom-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.75rem;
    gap: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(61, 94, 255, 0.25);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    box-sizing: border-box;
}

.custom-rom-banner:hover {
    border-color: var(--neon-cyan);
    background: rgba(61, 94, 255, 0.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(61, 94, 255, 0.08);
}

.custom-rom-banner:active {
    transform: scale(0.98);
    border-color: var(--neon-cyan);
    background: rgba(61, 94, 255, 0.03);
}

.custom-rom-icon {
    font-size: 2.4rem;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 10px var(--neon-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-rom-text {
    width: 100%;
}

.custom-rom-text h3 {
    margin: 0 0 0.5rem 0;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #fff;
}

.custom-rom-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.45;
}

.custom-rom-banner .btn-play-game {
    width: 100%;
}
