@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Orbitron:wght@400;700;900&display=swap');

:root {
  /* V3 NEON HORIZON PALETTE */
  --bg-deep: #050510;
  --bg-dark-mesh: #0a0a1f;

  --neon-blue: #00f3ff;
  --neon-pink: #bc13fe;
  --neon-gold: #ffd700;
  --neon-green: #00ff00;

  --glass-surface: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.2);

  --text-primary: #ffffff;
  --text-secondary: #a0a0c0;

  --font-main: 'Inter', sans-serif;
  --font-display: 'Orbitron', sans-serif;
  /* Futuristic Header Font */

  --shadow-neon-blue: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 20px rgba(0, 243, 255, 0.3);
  --shadow-neon-pink: 0 0 10px rgba(188, 19, 254, 0.5), 0 0 20px rgba(188, 19, 254, 0.3);
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.2), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(29, 78, 216, 0.2), transparent 25%);
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: crosshair;
  /* ARCADE FEEL */
}

/* ANIMATED BACKGROUND MESH */

@keyframes meshShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* NEW ANIMATIONS */

@keyframes popIn {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

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

  to {
    transform: rotate(360deg);
  }
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(-2px, -2px);
  }

  60% {
    transform: translate(2px, 2px);
  }

  80% {
    transform: translate(2px, -2px);
  }

  100% {
    transform: translate(0);
  }
}

@keyframes shake {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
  }

  10% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }

  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }

  30% {
    transform: translate(3px, 2px) rotate(0deg);
  }

  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }

  50% {
    transform: translate(-1px, 2px) rotate(-1deg);
  }

  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }

  70% {
    transform: translate(3px, 1px) rotate(-1deg);
  }

  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }

  90% {
    transform: translate(1px, 2px) rotate(0deg);
  }

  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- GLASS SYSTEM --- */

/* Base Glass Card */

.glass-panel {
  background: var(--glass-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  border-radius: 20px;
  color: white;
}

/* Interactive Glass Card (formerly bento-card) */

.bento-card {
  background: rgba(20, 20, 35, 0.6);
  /* Darker base for legibility */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.bento-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.05);
  z-index: 10;
}

/* --- UTILS --- */

.text-neon-blue {
  color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.7);
}

.text-neon-pink {
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(188, 19, 254, 0.7);
}

.squishy-btn {
  transition: transform 0.1s;
  cursor: pointer;
}

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

/* Scrollbar */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #050510;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

/* --- THEME ENGINE --- */

body.theme_matrix {
  --bg-deep: #020502;
  --neon-blue: #00ff41;
  --neon-pink: #008f11;
  --neon-gold: #0d0208;
  --text-primary: #00ff41;
  --text-secondary: #003b00;
  --glass-surface: rgba(0, 20, 0, 0.7);
  --glass-border: #003b00;
  --font-display: 'Courier New', monospace;
  --font-main: 'Courier New', monospace;
}

body.theme_sunset {
  --bg-deep: #2d1b2e;
  --neon-blue: #ff0055;
  --neon-pink: #ffcc00;
  --text-primary: #ffeb3b;
  --glass-surface: rgba(255, 0, 85, 0.1);
}

body.theme_space {
  --bg-deep: #000000;
  --neon-blue: #ffffff;
  --neon-pink: #505050;
  --glass-surface: rgba(255, 255, 255, 0.05);
}

body.theme_gold {
  --bg-deep: #1a1a00;
  --neon-blue: #DAA520;
  --neon-pink: #FFD700;
  --text-primary: #FFD700;
  --glass-surface: rgba(255, 215, 0, 0.1);
  --glass-border: #FFD700;
}

@keyframes screen-shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-it {
  animation: screen-shake 0.3s;
  animation-iteration-count: 1;
}

button:active, a:active, .bento-card:active {
  transform: scale(0.92) !important;
  transition: transform 0.05s ease !important;
  filter: brightness(1.2) !important;
}

.bento-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    position: relative;
    transform-style: preserve-3d;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #ff00ff, #00ffcc, #ff0055, #00ffcc);
    z-index: -1;
    border-radius: inherit;
    background-size: 400%;
    animation: neonGlow 5s linear infinite;
    opacity: 0.3;
    transition: opacity 0.3s ease-in-out;
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3), 0 0 20px rgba(255, 0, 255, 0.2) !important;
}

@keyframes neonGlow {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

/* TIKTOK STREAMER MODE */

body.tiktok-mode-active {
    background: #000 !important;
}

body.tiktok-mode-active .global-header, 
body.tiktok-mode-active .sidebar,
body.tiktok-mode-active .radio-widget,
body.tiktok-mode-active .multiplayer-cursors {
    display: none !important;
}

body.tiktok-mode-active .main-content {
    max-width: 450px !important;
    height: 850px !important;
    max-height: 90vh !important;
    aspect-ratio: 9/16 !important;
    margin: 5vh auto !important;
    padding: 0 !important;
    border: 12px solid #333 !important;
    border-radius: 40px !important;
    box-shadow: 0 0 50px rgba(0, 255, 204, 0.5), inset 0 0 20px rgba(0,0,0,0.8) !important;
    overflow: hidden !important;
    position: relative;
    background: var(--bg-deep) !important;
    transform: scale(0.95);
}

body.tiktok-mode-active .main-content::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 150px; height: 30px;
    background: #333;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 999999;
}
.layout-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-logo {
    height: 40px;
    transition: opacity 0.2s;
}

.header-logo:hover {
    opacity: 0.8;
}

.main-logo {
    animation: wiggle 3s infinite ease-in-out;
}

.mascot-logo {
    height: 60px;
    animation: float 2s infinite ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.main-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
}

.arcade-link {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.arcade-link:hover {
    background-color: var(--accent-color);
    color: #000;
    box-shadow: 0 0 10px var(--accent-color);
}

.main-content {
    flex: 1;
    padding: 20px;
    position: relative;
}

.main-footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.8rem;
    border-top: 1px solid #333;
}

/* CRT SCANLINE & VIGNETTE */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9998;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    opacity: 0.6;
}

body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 9998;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}/* CRT Scanline and Flicker Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    opacity: 0.15;
}

.crt-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99998;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.6) 100%);
}

.crt-flicker {
    animation: crt-flicker 0.15s infinite;
}

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

/* RGB Split (Chromatic Aberration) */
.rgb-split {
    text-shadow: 2px 0 0 rgba(255,0,0,0.5), -2px 0 0 rgba(0,255,255,0.5) !important;
}


/* ARCADE CURSOR */
body, html, * {
    cursor: url('https://cur.cursors-4u.net/games/gam-11/gam1090.cur'), auto !important;
}
button:hover, a:hover, [role="button"]:hover, .clickable:hover {
    cursor: url('https://cur.cursors-4u.net/games/gam-11/gam1090.cur'), pointer !important;
}
