/**
 * ═══════════════════════════════════════════════════════════════
 * NEM5.COM - THE GAMING ARENA
 * Design System: "Dark Cyber Gradient"
 * ═══════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   FONTS - Modern Display + Clean Body
   ═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════
   CSS RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* ═══════════════════════════════════════════════════════════════
       NEM5 DARK CYBER GRADIENT THEME
       ═══════════════════════════════════════════════════════════════ */

    /* Base Colors - Dark Mode Foundation */
    --bg-primary: #0D0D12;
    /* Deep space black */
    --bg-secondary: #16161D;
    /* Elevated dark surface */
    --bg-card: #1E1E26;
    /* Card backgrounds */
    --bg-hover: #2A2A35;
    /* Hover states */

    /* Legacy mappings for compatibility */
    --bg-paper: #0D0D12;
    --bg-white: #1E1E26;
    --ink-black: #F0F0F5;
    --border-black: rgba(255, 255, 255, 0.15);

    /* Text Colors */
    --text-primary: #F0F0F5;
    /* Bright white text */
    --text-secondary: #9898A6;
    /* Muted gray text */
    --text-accent: #00F5D4;
    /* Electric teal highlights */

    /* Brand Gradient - The Signature Look */
    --gradient-primary: linear-gradient(135deg, #00F5D4, #7B61FF);
    --gradient-secondary: linear-gradient(135deg, #7B61FF, #FF6B9D);
    --gradient-gold: linear-gradient(135deg, #FFD93D, #FF9500);

    /* Accent Colors */
    --accent-teal: #00F5D4;
    /* Primary CTA color */
    --accent-violet: #7B61FF;
    /* Secondary accent */
    --accent-pink: #FF6B9D;
    /* Tertiary accent */
    --accent-gold: #FFD93D;
    /* XP/Achievement highlights */

    /* Legacy pastel mappings - now vibrant */
    --pastel-purple: #7B61FF;
    --pastel-mint: #00F5D4;
    --pastel-yellow: #FFD93D;
    --pastel-pink: #FF6B9D;
    --pastel-blue: #4F9DFF;
    --pastel-orange: #FF9500;

    /* Typography */
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Borders & Shadows - Modern Glow */
    --border-subtle: 1px solid rgba(255, 255, 255, 0.1);
    --border-accent: 2px solid var(--accent-teal);
    --border-thick: 1px solid rgba(255, 255, 255, 0.15);
    --shadow-hard: 0 4px 20px rgba(0, 245, 212, 0.15);
    --shadow-pressed: 0 2px 10px rgba(0, 245, 212, 0.1);
    --shadow-glow: 0 0 30px rgba(0, 245, 212, 0.2);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);

    /* Border Radius - Smooth Modern */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */
.hard-shadow {
    box-shadow: var(--shadow-glow);
    border: var(--border-subtle);
}

.hard-shadow-sm {
    box-shadow: 0 2px 12px rgba(0, 245, 212, 0.1);
    border: var(--border-subtle);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        var(--gradient-primary) border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

p {
    font-size: 1rem;
    color: var(--text-primary);
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-teal);
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

main {
    padding: var(--space-8) 0;
    position: relative;
    z-index: 1;
    /* Below header (z-index: 1000) */
}

/* ═══════════════════════════════════════════════════════════════
   HEADER - Dark Glass Bar
   ═══════════════════════════════════════════════════════════════ */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(13, 13, 18, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--border-subtle);
    padding: var(--space-4) 0;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.03em;
}

.logo:hover {
    opacity: 1;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-6);
}

header nav ul li a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    padding: var(--space-2) 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease;
}

header nav ul li a:hover {
    color: var(--accent-teal);
    border-bottom-color: var(--accent-teal);
}

/* Mobile Nav Toggle */
@media (max-width: 640px) {
    header nav ul {
        gap: var(--space-4);
    }

    header nav ul li a {
        font-size: 0.875rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER - Dark Gradient Bottom
   ═══════════════════════════════════════════════════════════════ */
footer {
    text-align: center;
    padding: var(--space-8) var(--space-6);
    border-top: var(--border-subtle);
    background: var(--bg-secondary);
    margin-top: var(--space-16);
}

footer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

footer nav {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

footer nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
}

footer nav a:hover {
    color: var(--accent-teal);
    text-decoration: underline;
}

/* Footer Nav Links */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
}

/* ═══════════════════════════════════════════════════════════════
   CARD - Glowing Dark Cards
   ═══════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--space-6);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    border-color: rgba(0, 245, 212, 0.3);
}

.card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

/* Card Content */
.card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
    display: inline-block;
}

.card h3 {
    margin-bottom: var(--space-2);
}

.card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-arrow {
    display: inline-block;
    margin-top: var(--space-4);
    font-size: 1.25rem;
    transition: transform 0.15s ease;
}

.card:hover .card-arrow {
    transform: translateX(4px);
}

/* Accent Card Variants */
.card--purple {
    background: var(--pastel-purple);
}

.card--mint {
    background: var(--pastel-mint);
}

.card--yellow {
    background: var(--pastel-yellow);
}

.card--pink {
    background: var(--pastel-pink);
}

.card--blue {
    background: var(--pastel-blue);
}

.card--orange {
    background: var(--pastel-orange);
}

/* Featured Card (Larger) */
.card--featured {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .card--featured {
        grid-column: span 1;
    }
}

/* ═══════════════════════════════════════════════════════════════
   GRID - The Playground Grid
   ═══════════════════════════════════════════════════════════════ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */
.hero {
    text-align: center;
    padding: var(--space-12) 0 var(--space-8);
}

.hero h1 {
    margin-bottom: var(--space-4);
}

.hero h1 span {
    display: inline-block;
    background: var(--pastel-yellow);
    padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
    margin-left: var(--space-1);
}

.hero p {
    font-size: 1.125rem;
    color: #555555;
    max-width: 500px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   THE STAGE - Game Container for play.php
   ═══════════════════════════════════════════════════════════════ */
.stage {
    background: var(--bg-white);
    border: 3px solid var(--border-black);
    border-radius: var(--radius-2xl);
    overflow: hidden;

    /* Dot Grid Background */
    background-image:
        radial-gradient(circle, #000000 1px, transparent 1px);
    background-size: 24px 24px;
    background-color: var(--bg-white);
}

.stage-header {
    background: var(--bg-white);
    padding: var(--space-5) var(--space-6);
    border-bottom: var(--border-thick);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.stage-header .icon {
    font-size: 2rem;
}

.stage-header h1 {
    font-size: 1.25rem;
    margin: 0;
}

.stage-header p {
    font-size: 0.875rem;
    color: #666666;
    margin: var(--space-1) 0 0;
}

.stage-content {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--bg-white);
}

.stage-content iframe {
    width: 100%;
    max-width: 800px;
    height: 500px;
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
}

.stage-content canvas {
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
}

.stage-controls {
    background: var(--bg-white);
    padding: var(--space-4) var(--space-6);
    border-top: var(--border-thick);
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS - Modern Gradient & Glow
   ═══════════════════════════════════════════════════════════════ */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: var(--space-3) var(--space-5);
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(0, 245, 212, 0.3);
    color: var(--text-primary);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-card);
}

/* Button Variants */
.btn--primary {
    background: var(--gradient-primary);
    color: #0D0D12;
    border: none;
    font-weight: 700;
}

.btn--primary:hover {
    box-shadow: 0 4px 20px rgba(0, 245, 212, 0.4);
    color: #0D0D12;
}

.btn--mint {
    background: var(--accent-teal);
    color: #0D0D12;
    border: none;
}

.btn--purple {
    background: var(--accent-violet);
    color: #FFFFFF;
    border: none;
}

.btn--yellow {
    background: var(--accent-gold);
    color: #0D0D12;
    border: none;
}

.btn--pink {
    background: var(--accent-pink);
    color: #0D0D12;
    border: none;
}

.btn--small {
    font-size: 0.875rem;
    padding: var(--space-2) var(--space-4);
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR (for play.php)
   ═══════════════════════════════════════════════════════════════ */
.play-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-6);
    align-items: start;
}

@media (max-width: 1024px) {
    .play-layout {
        grid-template-columns: 1fr;
    }
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.sidebar-card {
    background: var(--bg-white);
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.sidebar-card ul {
    list-style: none;
}

.sidebar-card li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid #EEEEEE;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 0.9375rem;
}

.sidebar-card li:last-child {
    border-bottom: none;
}

/* Related Games Grid */
.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.related-card {
    background: var(--bg-paper);
    border: var(--border-thick);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    text-align: center;
    text-decoration: none;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 2px 2px 0px 0px var(--border-black);
}

.related-card:hover {
    transform: translate(1px, 1px);
    box-shadow: 0px 0px 0px 0px var(--border-black);
}

.related-card .icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: var(--space-1);
}

.related-card span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS & INPUTS
   ═══════════════════════════════════════════════════════════════ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-white);
    border: var(--border-thick);
    border-radius: var(--radius-md);
    width: 100%;
    transition: box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: var(--shadow-hard);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-2);
    font-size: 0.9375rem;
}

/* ═══════════════════════════════════════════════════════════════
   TABLES (Admin Panel)
   ═══════════════════════════════════════════════════════════════ */
table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid var(--border-black);
    background: var(--bg-white);
}

th,
td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border: 2px solid var(--border-black);
}

th {
    background: #000000;
    color: #FFFFFF;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    font-size: 0.9375rem;
    background: #FFFFFF;
}

tbody tr:hover {
    background: var(--pastel-yellow);
}

/* ═══════════════════════════════════════════════════════════════
   BADGES & TAGS
   ═══════════════════════════════════════════════════════════════ */
.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border-black);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge--success {
    background: var(--pastel-mint);
}

.badge--warning {
    background: var(--pastel-yellow);
}

.badge--danger {
    background: #FECACA;
}

.badge--info {
    background: var(--pastel-blue);
}

/* ═══════════════════════════════════════════════════════════════
   ALERTS / MESSAGES
   ═══════════════════════════════════════════════════════════════ */
.alert {
    padding: var(--space-4);
    border: var(--border-thick);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    font-weight: 500;
}

.alert--success {
    background: var(--pastel-mint);
}

.alert--error {
    background: #FECACA;
}

.alert--info {
    background: var(--pastel-blue);
}

/* ═══════════════════════════════════════════════════════════════
   LEADERBOARD RANKS
   ═══════════════════════════════════════════════════════════════ */
.rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: var(--border-thick);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
}

.rank--gold {
    background: #FDE68A;
}

.rank--silver {
    background: #E5E7EB;
}

.rank--bronze {
    background: #FED7AA;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════════ */
.section-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.section-header h2 {
    display: inline-block;
    padding: var(--space-2) var(--space-5);
    background: var(--pastel-yellow);
    border: var(--border-thick);
    border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════════ */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: var(--border-thick);
}

.admin-header h1 {
    font-size: 1.5rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

.admin-stat {
    background: var(--bg-white);
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
}

.admin-stat .value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
}

.admin-stat .label {
    font-size: 0.875rem;
    color: #666666;
    margin-top: var(--space-2);
}

.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-6);
}

@media (max-width: 1000px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-card {
    background: var(--bg-white);
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
}

.admin-card h2 {
    font-size: 1.125rem;
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Action Buttons for Tables */
.action-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    padding: var(--space-1) var(--space-3);
    background: var(--bg-white);
    border: 2px solid var(--border-black);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0px 0px var(--border-black);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    margin-right: var(--space-1);
}

.action-btn:hover {
    transform: translate(1px, 1px);
    box-shadow: 0px 0px 0px 0px var(--border-black);
}

.action-btn.ban {
    background: var(--pastel-yellow);
}

.action-btn.edit {
    background: var(--pastel-purple);
}

.action-btn.delete {
    background: #FECACA;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border-black);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.active {
    background: var(--pastel-mint);
}

.status-badge.banned {
    background: #FECACA;
}

/* Search Form */
.search-form {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.search-form input {
    flex: 1;
}

/* Login Card */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-white);
    border: var(--border-thick);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-hard);
    padding: var(--space-8);
    text-align: center;
}

.login-card h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-2);
}

.login-card p {
    color: #666666;
    margin-bottom: var(--space-6);
}

.login-card input {
    margin-bottom: var(--space-4);
    text-align: center;
}

.login-card button {
    width: 100%;
}

/* Log entries */
.log-entry {
    padding: var(--space-3) 0;
    border-bottom: 1px solid #EEEEEE;
    font-size: 0.875rem;
}

.log-entry .time {
    color: #999999;
}

.log-entry .action {
    font-weight: 600;
    color: var(--ink-black);
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */
.text-center {
    text-align: center;
}

.text-muted {
    color: #666666;
}

.mt-4 {
    margin-top: var(--space-4);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

/* ═══════════════════════════════════════════════════════════════
   GLASS CARD BACKWARD COMPATIBILITY
   These map old class names to the new design
   ═══════════════════════════════════════════════════════════════ */
.glass-card {
    background: var(--bg-white);
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.artifact-card {
    background: var(--bg-white);
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hard);
    padding: var(--space-6);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.artifact-card:hover {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-pressed);
    opacity: 1;
}

.artifact-card.featured {
    grid-column: span 2;
    background: var(--pastel-yellow);
}

@media (max-width: 768px) {
    .artifact-card.featured {
        grid-column: span 1;
    }
}

.artifact-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
}

.artifact-card h3 {
    margin-bottom: var(--space-2);
    color: var(--ink-black);
}

.artifact-card p,
.artifact-card .card-desc {
    font-size: 0.9375rem;
    color: #555555;
    line-height: 1.5;
    flex-grow: 1;
}

.artifact-arrow {
    display: inline-block;
    margin-top: var(--space-4);
    font-size: 1.25rem;
    transition: transform 0.15s ease;
}

.artifact-card:hover .artifact-arrow {
    transform: translateX(4px);
}

/* Game Container Backward Compatibility */
.play-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-6);
}

@media (max-width: 1024px) {
    .play-container {
        grid-template-columns: 1fr;
    }
}

.game-stage {
    background: var(--bg-white);
    border: 3px solid var(--border-black);
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.game-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: var(--border-thick);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--bg-white);
}

.game-header .emoji {
    font-size: 2rem;
}

.game-header .info h1 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0;
}

.game-header .info p {
    font-size: 0.875rem;
    color: #666666;
    margin: var(--space-1) 0 0;
}

.game-frame-container {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background-image: radial-gradient(circle, #00000015 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: var(--bg-paper);
}

.game-frame {
    width: 100%;
    max-width: 800px;
    height: 500px;
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
}

/* ═══════════════════════════════════════════════════════════════
   FORCE OVERRIDES FOR ROGUE GAMES
   Ensures all game content matches the Digital Playground theme
   ═══════════════════════════════════════════════════════════════ */
.game-stage-container,
.game-frame-container {
    background-color: #FAFAFA !important;
}

.game-stage-container canvas,
.game-frame-container canvas,
#game-canvas,
#memeCanvas {
    background-color: #FFFFFF !important;
    border: 2px solid #000000 !important;
    box-shadow: 4px 4px 0px 0px #000000 !important;
    border-radius: 8px !important;
}

/* Tool cards within games */
.tool-card,
.game-container,
.glass-card {
    background: #FFFFFF !important;
    border: 2px solid #000000 !important;
    box-shadow: 4px 4px 0px 0px #000000 !important;
    border-radius: 16px !important;
    color: #111111 !important;
}

/* Force light theme on inputs inside tools */
.tool-card input[type="text"],
.tool-card input[type="file"],
.tool-card input[type="number"],
.tool-card textarea,
.tool-card select {
    background: #FFFFFF !important;
    border: 2px solid #000000 !important;
    color: #111111 !important;
    padding: 10px !important;
    border-radius: 8px !important;
}

.tool-card input:focus,
.tool-card textarea:focus {
    box-shadow: 4px 4px 0px 0px #000000 !important;
    outline: none !important;
}

/* Force light theme on labels */
.tool-card label,
.input-group label {
    color: #111111 !important;
}

/* Force light theme on buttons inside tools */
.tool-card button,
.tool-card .btn,
.tool-card .btn-primary,
.tool-card .btn-sm {
    background: #A7F3D0 !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
    font-weight: bold !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
    border-radius: 8px !important;
}

.tool-card button:hover,
.tool-card .btn:hover {
    transform: translate(1px, 1px) !important;
    box-shadow: 0px 0px 0px 0px #000000 !important;
}

/* Tool titles */
.tool-title {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #111111 !important;
    color: #111111 !important;
    font-family: 'Space Grotesk', sans-serif !important;
}

.tool-subtitle,
.hint {
    color: #666666 !important;
}

#canvas-game-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#game-canvas {
    border: var(--border-thick);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
}

.control-bar {
    padding: var(--space-4) var(--space-6);
    border-top: var(--border-thick);
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
    background: var(--bg-white);
}

.control-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    padding: var(--space-2) var(--space-4);
    background: var(--bg-white);
    border: var(--border-thick);
    border-radius: var(--radius-md);
    box-shadow: 3px 3px 0px 0px var(--border-black);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--ink-black);
}

.control-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px 0px var(--border-black);
}

.control-btn.primary {
    background: var(--pastel-mint);
}

.play-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-4);
    font-family: var(--font-display);
}

.instructions-text {
    color: #555555;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.leaderboard-list {
    list-style: none;
}

.leaderboard-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid #EEEEEE;
}

.leaderboard-list li:last-child {
    border-bottom: none;
}

.player-name {
    flex: 1;
    font-size: 0.9375rem;
}

.player-score {
    font-weight: 600;
    color: var(--ink-black);
}

.related-games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.related-game-card {
    background: var(--bg-paper);
    border: var(--border-thick);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    text-align: center;
    text-decoration: none;
    box-shadow: 2px 2px 0px 0px var(--border-black);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.related-game-card:hover {
    transform: translate(1px, 1px);
    box-shadow: 0px 0px 0px 0px var(--border-black);
    opacity: 1;
}

.related-game-card .emoji {
    font-size: 1.5rem;
    display: block;
    margin-bottom: var(--space-1);
}

.related-game-card .name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ink-black);
}

/* ═══════════════════════════════════════════════════════════════
   SWEETALERT / POPUP OVERRIDES
   Forces Digital Playground theme on all game modals
   ═══════════════════════════════════════════════════════════════ */
.swal2-popup {
    background: #FFFFFF !important;
    border: 3px solid #000000 !important;
    border-radius: 16px !important;
    box-shadow: 8px 8px 0px 0px #000000 !important;
    color: #111111 !important;
}

.swal2-title {
    font-family: 'Space Grotesk', sans-serif !important;
    color: #111111 !important;
}

.swal2-html-container,
.swal2-content {
    color: #666666 !important;
}

.swal2-confirm {
    background: #A7F3D0 !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    color: #000000 !important;
    font-weight: 600 !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
}

.swal2-confirm:hover {
    background: #A7F3D0 !important;
    transform: translate(1px, 1px) !important;
    box-shadow: 0px 0px 0px 0px #000000 !important;
}

.swal2-cancel {
    background: #FAFAFA !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    color: #000000 !important;
    font-weight: 600 !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
}

.swal2-input {
    background: #FFFFFF !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    color: #111111 !important;
}

.swal2-input:focus {
    box-shadow: 4px 4px 0px 0px #000000 !important;
    border-color: #000000 !important;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MODAL STYLES
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-4);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-box {
    background: var(--bg-white);
    border: 3px solid var(--border-black);
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 2px solid var(--border-black);
    background: var(--pastel-mint);
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.btn-close {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-black);
    border-radius: 8px;
    background: var(--bg-white);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
}

.btn-close:hover {
    background: var(--ink-black);
    color: var(--bg-white);
}

.modal-body {
    padding: var(--space-5);
}

.auth-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.auth-tab {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--border-black);
    border-radius: 8px;
    background: var(--bg-paper);
    cursor: pointer;
    transition: all 0.1s ease;
}

.auth-tab:hover {
    background: var(--pastel-yellow);
}

.auth-tab.active {
    background: var(--ink-black);
    color: var(--bg-white);
    box-shadow: 3px 3px 0 var(--border-black);
    transform: translate(-2px, -2px);
}

.input-field {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: 1rem;
    border: 2px solid var(--border-black);
    border-radius: 8px;
    background: var(--bg-white);
    margin-bottom: var(--space-3);
    transition: all 0.1s ease;
}

.input-field:focus {
    outline: none;
    box-shadow: 4px 4px 0 var(--border-black);
    transform: translate(-2px, -2px);
}

.input-field::placeholder {
    color: #888;
}

.btn-primary {
    width: 100%;
    padding: var(--space-4);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    border: 2px solid var(--border-black);
    border-radius: 8px;
    background: var(--ink-black);
    color: var(--bg-white);
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 4px 4px 0 var(--border-black);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--border-black);
}

.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-black);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 4px 4px 0 var(--border-black);
}

.btn-success {
    width: 100%;
    padding: var(--space-4);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    border: 2px solid var(--border-black);
    border-radius: 8px;
    background: var(--pastel-mint);
    color: var(--ink-black);
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 4px 4px 0 var(--border-black);
}

.btn-success:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--border-black);
}

.btn-success:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--border-black);
}

.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.full-width {
    width: 100%;
}

.auth-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px dashed #ccc;
}

/* ═══════════════════════════════════════════════════════════════
   IMMERSIVE GAME CONTAINER - Neal.fun Style Full-Screen Layout
   ═══════════════════════════════════════════════════════════════ */
.game-container-immersive {
    width: 95%;
    max-width: 1400px;
    min-height: 85vh;
    margin: 20px auto;
    background: #FFFFFF;
    border: 3px solid #000000;
    box-shadow: 8px 8px 0px #000000;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.game-container-immersive .game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #FFFFFF;
    border-bottom: 3px solid #000000;
    flex-shrink: 0;
}

.game-container-immersive .game-header h1 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-container-immersive .game-stats {
    display: flex;
    gap: 24px;
}

.game-container-immersive .stat-box {
    text-align: center;
    background: #FAFAFA;
    border: 2px solid #000000;
    padding: 8px 16px;
}

.game-container-immersive .stat-box .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 1px;
}

.game-container-immersive .stat-box .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
}

.game-container-immersive .game-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    position: relative;
    min-height: 0;
}

.game-container-immersive .game-area canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.game-container-immersive .game-area iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-container-immersive .game-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: #FFFFFF;
    border-top: 3px solid #000000;
    flex-shrink: 0;
}

/* Mobile Responsive - Edge-to-Edge */
@media (max-width: 768px) {
    .game-container-immersive {
        width: 100%;
        height: 100vh;
        min-height: 100vh;
        margin: 0;
        border-left: none;
        border-right: none;
        border-radius: 0;
        box-shadow: none;
    }

    .game-container-immersive .game-header {
        padding: 12px 16px;
    }

    .game-container-immersive .game-header h1 {
        font-size: 1.1rem;
    }

    .game-container-immersive .game-stats {
        gap: 12px;
    }

    .game-container-immersive .stat-box {
        padding: 6px 10px;
    }

    .game-container-immersive .stat-box .value {
        font-size: 1rem;
    }

    .game-container-immersive .game-controls {
        padding: 12px 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE - Global Optimizations (768px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Prevent horizontal scroll */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Containers - Full width with minimal padding */
    .container {
        width: 95% !important;
        padding: 0 12px !important;
        margin: 10px auto !important;
    }

    main {
        padding: var(--space-4) 0;
    }

    /* Typography - Readable on small screens */
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.4rem !important;
    }

    h3 {
        font-size: 1.15rem !important;
    }

    p {
        font-size: 0.95rem;
    }

    /* Header - Wrap and scroll friendly */
    header {
        padding: var(--space-3) 0;
    }

    header nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 12px;
    }

    .logo {
        font-size: 1.25rem;
    }

    header nav ul {
        display: flex;
        gap: var(--space-3);
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 8px 0;
    }

    header nav ul::-webkit-scrollbar {
        display: none;
    }

    /* Thumb-Friendly Touch Targets (44px minimum) */
    header nav ul li a {
        min-height: 44px;
        padding: 12px 10px;
        display: inline-flex;
        align-items: center;
        font-size: 0.85rem;
    }

    .nav-actions {
        gap: 8px !important;
    }

    .nav-actions .btn--small {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* Cards - Full width, smaller shadow */
    .card {
        box-shadow: 3px 3px 0 var(--border-black);
        padding: var(--space-4);
    }

    .card-icon {
        font-size: 2rem;
    }

    /* Grid - Single column */
    .grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-4);
    }

    /* Hero - Compact */
    .hero {
        padding: var(--space-6) 0 var(--space-4);
    }

    .hero p {
        font-size: 1rem;
    }

    /* Buttons - Smaller shadows */
    .btn {
        box-shadow: 3px 3px 0 var(--border-black);
    }

    /* Footer - Tighter */
    footer {
        padding: var(--space-6) var(--space-4);
        margin-top: var(--space-8);
    }

    footer nav {
        gap: var(--space-3);
    }

    /* Glass Card (Legal pages) */
    .glass-card {
        padding: var(--space-4) !important;
        margin: var(--space-4) 0 !important;
    }

    /* Sidebar - Stack below */
    .play-sidebar {
        grid-template-columns: 1fr !important;
    }

    /* Cinema Stage - Edge to Edge */
    .cinema-container {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .cinema-stage {
        width: 100vw !important;
        height: 70vh !important;
        min-height: 400px;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .game-info {
        padding: 0 12px;
        margin-bottom: 12px;
    }

    .game-info h1 {
        font-size: 1.25rem !important;
    }

    .control-bar {
        padding: 12px;
    }

    .ctrl-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    /* Hide header install button on mobile (use FAB instead) */
    #installAppBtn {
        display: none !important;
    }

    /* ═══════════════════════════════════════════════════════════════
       MOBILE OPTIMIZATION - Thumb-Friendly Overhaul
       ═══════════════════════════════════════════════════════════════ */

    /* Force containers to 95% width with proper centering */
    .container,
    .game-container,
    .card {
        width: 95% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    /* Homepage grid - Force single column */
    .grid,
    main .grid,
    .container .grid,
    .big4-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Section padding reduction (50px → 20px) */
    section {
        padding: 20px 0 !important;
    }

    /* Typography - Mobile optimized */
    h1 {
        font-size: 1.8rem !important;
    }

    p {
        font-size: 1rem;
    }

    /* Footer - Stack columns vertically */
    .footer-content {
        padding: 24px 16px !important;
    }

    .footer-content .business-info {
        padding: 16px 20px !important;
        margin-bottom: 20px !important;
    }

    .footer-content .business-info p {
        font-size: 0.9rem;
    }

    /* Force footer nav to stack vertically (override inline styles) */
    footer nav,
    .footer-content nav,
    .footer-nav,
    footer>.footer-content>nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    footer nav a,
    .footer-content nav a,
    .footer-nav a {
        display: block !important;
        padding: 10px 16px !important;
        min-height: 44px !important;
        line-height: 24px !important;
        text-align: center !important;
    }

    /* Prevent borders from causing horizontal scroll */
    * {
        box-sizing: border-box !important;
    }

    /* Ensure no horizontal overflow */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .stage,
    .card,
    .sidebar-card,
    .alert,
    table {
        max-width: 100% !important;
        overflow-x: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PWA INSTALL BUTTON - Floating Action Button (Mobile)
   ═══════════════════════════════════════════════════════════════ */
#pwa-install-fab {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: auto;
    min-width: 56px;
    height: 56px;
    padding: 0 20px;
    background: var(--pastel-mint);
    border: 3px solid #000;
    border-radius: 28px;
    box-shadow: 4px 4px 0 #000;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: #000;
    cursor: pointer;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#pwa-install-fab:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

#pwa-install-fab:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #000;
}

#pwa-install-fab .icon {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    #pwa-install-fab.visible {
        display: flex;
    }
}

/* ═══════════════════════════════════════════════════════════════
   HAMBURGER MENU - Mobile Navigation
   ═══════════════════════════════════════════════════════════════ */

/* Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: var(--bg-white);
    border: 2px solid #000;
    border-radius: var(--radius-md);
    cursor: pointer;
    z-index: 1001;
    transition: box-shadow 0.1s ease;
}

.hamburger-btn:hover {
    box-shadow: 2px 2px 0 #000;
}

.hamburger-btn:active {
    box-shadow: none;
    transform: translate(2px, 2px);
}

.hamburger-line {
    width: 20px;
    height: 3px;
    background: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation - X when open */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Nav Overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    z-index: 1000;
    padding: 100px 24px 40px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-nav.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav ul li {
    margin-bottom: 8px;
}

.mobile-nav ul li a {
    display: block;
    padding: 16px 20px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    color: #000;
    background: var(--bg-paper);
    border: 2px solid #000;
    border-radius: var(--radius-md);
    box-shadow: 3px 3px 0 #000;
    transition: all 0.1s ease;
}

.mobile-nav ul li a:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* Desktop Nav - Hidden on Mobile */
.desktop-nav {
    display: flex;
    list-style: none;
    gap: var(--space-6);
}

/* Mobile Breakpoint */
/* Mobile Breakpoint */
@media (max-width: 768px) {

    /* Hide desktop only elements */
    .desktop-only {
        display: none !important;
    }

    /* Show hamburger button */
    .hamburger-btn {
        display: flex;
        margin-left: auto;
        /* Push to right if needed */
    }

    /* Hide desktop nav */
    .desktop-nav {
        display: none !important;
    }

    /* Adjust nav layout */
    header nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
    }

    /* Mobile Nav Overlay - Slide from Right */
    .mobile-nav {
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        padding: 80px 24px 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center vertical */
        text-align: center;
    }

    .mobile-nav.open {
        transform: translateX(0);
        opacity: 1;
    }

    .mobile-nav ul li a,
    .mobile-nav ul li .btn {
        font-size: 1.25rem;
        padding: 16px;
        width: 100%;
        justify-content: center;
    }
}