:root {
  color-scheme: dark;

  --bg: #0e1a40;
  --bg-soft: #14235a;
  --bg-deep: #0b1331;
  --card: #1d2f6d;
  --card-deep: #19295b;
  --accent: #2e51ff;
  --accent-strong: #4d6bff;
  --accent-soft: rgba(46, 81, 255, 0.35);
  --text: #f7f9ff;
  --muted: rgba(247, 249, 255, 0.74);
  --shadow: rgba(4, 10, 30, 0.55);
  --outline: rgba(255, 255, 255, 0.28);
  --particle-color: rgba(255, 255, 255, 0.9);
  --nav-bg: rgba(10, 18, 45, 0.5);
  --accent-text: #0e1a40;
}

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

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--card);
  border-radius: 6px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--card-deep);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--card) var(--bg);
}

html {
  min-height: 100vh;
  height: 100%;
  width: 100%;
  background-color: var(--bg);
  font-size: 93.75%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.3s ease;
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 55%, var(--bg-deep) 100%);
  z-index: -1;
  pointer-events: none;
  opacity: 1;
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.8;
  pointer-events: none;
}

#dizzy-lightning-svg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.dizzy-rayo {
  stroke-linecap: round;
  fill: none;
  opacity: 0;
  animation: dizzy-rayo-appear 0.2s ease-out, dizzy-rayo-fade 0.5s ease-in 0.2s forwards;
}

@keyframes dizzy-rayo-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dizzy-rayo-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

body[data-theme="midnight"] {
  --bg: #0b153d;
  --bg-soft: #111f52;
  --bg-deep: #091333;
  --card: #1a2f6f;
  --card-deep: #152659;
  --accent: #3f6bff;
  --accent-strong: #5d82ff;
  --accent-soft: rgba(63, 107, 255, 0.45);
  --particle-color: rgba(208, 220, 255, 0.9);
  --nav-bg: rgba(10, 16, 40, 0.62);
  --accent-text: #f7f9ff;
  background: linear-gradient(-45deg, #020617, #0b153d, #1e293b, #0f1a3e);
  background-size: 400% 400%;
  animation: gradient-shift 16s ease infinite;
}

body[data-theme="neon-tide"] {
  --bg: #091a2f;
  --bg-soft: #0f2645;
  --bg-deep: #061427;
  --card: #153865;
  --card-deep: #0e2a4d;
  --accent: #53ffd9;
  --accent-strong: #25e9c7;
  --accent-soft: rgba(83, 255, 217, 0.28);
  --particle-color: rgba(83, 255, 217, 0.8);
  --nav-bg: rgba(7, 26, 45, 0.7);
  --accent-text: #061427;
  background: linear-gradient(-45deg, #2e0249, #570a57, #091a2f, #a91079);
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
}

body[data-theme="sunset-drive"] {
  --bg: #2a1438;
  --bg-soft: #351a4b;
  --bg-deep: #1c0d2a;
  --card: #4b225c;
  --card-deep: #3d1b50;
  --accent: #ff6a9f;
  --accent-strong: #ff4b85;
  --accent-soft: rgba(255, 106, 159, 0.35);
  --particle-color: rgba(255, 214, 230, 0.9);
  --nav-bg: rgba(42, 20, 56, 0.65);
  --accent-text: #1c0d2a;
  background: linear-gradient(-45deg, #ff6b6b, #556270, #3a1c71, #d76d77);
  background-size: 400% 400%;
  animation: gradient-shift 10s ease infinite;
}

body[data-theme="ember-haze"] {
  --bg: #2b1417;
  --bg-soft: #3a1a1f;
  --bg-deep: #1b0a0d;
  --card: #53242b;
  --card-deep: #3f1a1f;
  --accent: #ff9a6b;
  --accent-strong: #ff7a44;
  --accent-soft: rgba(255, 154, 107, 0.35);
  --particle-color: rgba(255, 100, 50, 0.8);
  --nav-bg: rgba(44, 20, 23, 0.7);
  --accent-text: #1b0a0d;
  background: linear-gradient(-45deg, #2b1417, #4a0e0e, #5c1515, #1b0a0d, #3a0505);
  background-size: 400% 400%;
  animation: gradient-shift 10s ease infinite;
}

body[data-theme="aurora-flow"] {
  --bg: #0b1b24;
  --bg-soft: #12303b;
  --bg-deep: #061017;
  --card: #1b3f4d;
  --card-deep: #142f3a;
  --accent: #7cffd6;
  --accent-strong: #4ff0c2;
  --accent-soft: rgba(124, 255, 214, 0.32);
  --particle-color: rgba(100, 255, 150, 0.6);
  --nav-bg: rgba(9, 25, 31, 0.7);
  --accent-text: #061017;
  background: linear-gradient(-45deg, #0f2027, #2a0e36, #002a2a, #0b1b24, #1a003a);
  background-size: 400% 400%;
  animation: gradient-shift 14s ease infinite;
}

body[data-theme="starlight"] {
  --bg: #0f1234;
  --bg-soft: #171a43;
  --bg-deep: #0b0d26;
  --card: #23275b;
  --card-deep: #1b1f4a;
  --accent: #b5a4ff;
  --accent-strong: #957dff;
  --accent-soft: rgba(181, 164, 255, 0.35);
  --text: #e8e4ff;
  --muted: rgba(232, 228, 255, 0.72);
  --shadow: rgba(11, 13, 38, 0.6);
  --outline: rgba(181, 164, 255, 0.22);
  --particle-color: rgba(220, 210, 255, 0.9);
  --nav-bg: rgba(12, 14, 40, 0.72);
  --accent-text: #0b0d26;
  background:
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px),
    linear-gradient(-45deg, #0b0d26, #1a1040, #0f1234, #0d0820);
  background-size: 550px 550px, 350px 350px, 250px 250px, 400% 400%;
  animation: starlightDrift 20s ease infinite;
}

body[data-theme="starlight"]::before {
  opacity: 0;
}

@keyframes starlightDrift {
  0% { background-position: 0 0, 40px 60px, 130px 270px, 0% 50%; }
  50% { background-position: 20px 30px, 60px 90px, 150px 290px, 100% 50%; }
  100% { background-position: 0 0, 40px 60px, 130px 270px, 0% 50%; }
}

body[data-theme="custom"] {
  background-attachment: fixed;
}

body[data-theme="dizzy"] {
  --bg: #0d0a0e;
  --bg-soft: #16121a;
  --bg-deep: #050406;
  --card: #1e1822;
  --card-deep: #151017;
  --accent: #b8254a;
  --accent-strong: #e0305e;
  --accent-soft: rgba(184, 37, 74, 0.35);
  --text: #f0e8ec;
  --muted: rgba(240, 232, 236, 0.6);
  --shadow: rgba(0, 0, 0, 0.85);
  --outline: rgba(255, 255, 255, 0.08);
  --particle-color: rgba(230, 180, 200, 0.5);
  --nav-bg: rgba(18, 12, 20, 0.88);
  --accent-text: #fdf8fa;
  background:
    radial-gradient(ellipse 120% 80% at 20% 20%, rgba(184, 37, 74, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 80% 120% at 80% 80%, rgba(160, 30, 60, 0.06) 0%, transparent 50%),
    linear-gradient(-45deg, #0d0a0e, #1a0d12, #0d0a0e, #120810, #080508);
  background-size: 100% 100%, 100% 100%, 400% 400%;
  animation: gradient-shift 20s ease infinite;
}

body[data-theme="minty"] {
  --bg: #061a12;
  --bg-soft: #0a241a;
  --bg-deep: #03150f;
  --card: #0d2e22;
  --card-deep: #0a241c;
  --accent: #5fffa0;
  --accent-strong: #7dffb8;
  --accent-soft: rgba(95, 255, 160, 0.28);
  --text: #e8fff4;
  --muted: rgba(232, 255, 244, 0.65);
  --shadow: rgba(0, 20, 12, 0.5);
  --outline: rgba(95, 255, 160, 0.18);
  --particle-color: rgba(125, 255, 184, 0.7);
  --nav-bg: rgba(6, 26, 18, 0.82);
  --accent-text: #021a10;
  background:
    radial-gradient(circle at 30% 30%, rgba(95, 255, 160, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(50, 220, 140, 0.05) 0%, transparent 45%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(20, 80, 50, 0.15) 0%, transparent 50%),
    linear-gradient(-35deg, #061a12, #0a2a1a, #052218, #0d1e16, #061a12);
  background-size: 100% 100%, 100% 100%, 100% 100%, 400% 400%;
  animation: mintyFloat 25s ease-in-out infinite;
}

body[data-theme="useawp"] {
  --bg: #0f1912;
  --bg-soft: #16261d;
  --bg-deep: #0c140f;
  --card: #233c2d;
  --card-deep: #1d3226;
  --accent: #467855;
  --accent-strong: #64966e;
  --accent-soft: rgba(100, 150, 110, 0.28);
  --text: #e1f0e6;
  --muted: rgba(170, 196, 178, 0.74);
  --shadow: rgba(8, 20, 12, 0.55);
  --outline: rgba(70, 120, 85, 0.45);
  --particle-color: rgba(225, 240, 230, 0.9);
  --nav-bg: rgba(25, 40, 32, 0.9);
  --accent-text: #e1f0e6;
  background: linear-gradient(180deg, #0f1912 0%, #122018 55%, #0c140f 100%);
  background-size: 100% 100%;
  animation: none;
}

@keyframes mintyFloat {
  0%, 100% { background-position: 0 0, 0 0, 0 0, 0% 50%; }
  33% { background-position: 0 0, 0 0, 0 0, 100% 50%; }
  66% { background-position: 0 0, 0 0, 0 0, 50% 100%; }
}

body[data-theme="cyberpunk"] {
  --bg: #0d0221;
  --bg-soft: #1a0840;
  --bg-deep: #050112;
  --card: #1a0d35;
  --card-deep: #120825;
  --accent: #ff2a6d;
  --accent-strong: #05d9e8;
  --accent-soft: rgba(5, 217, 232, 0.25);
  --text: #d1f7ff;
  --muted: rgba(209, 247, 255, 0.75);
  --shadow: rgba(0, 0, 0, 0.7);
  --outline: rgba(255, 42, 109, 0.35);
  --particle-color: rgba(5, 217, 232, 0.8);
  --nav-bg: rgba(13, 2, 33, 0.9);
  --accent-text: #0d0221;
  background: linear-gradient(-45deg, #0d0221, #1a0840, #2d1b69, #0d0221, #1a0840);
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
}

body[data-theme="synthwave"] {
  --bg: #2b213a;
  --bg-soft: #3d2d52;
  --bg-deep: #1a1425;
  --card: #3d2f50;
  --card-deep: #2d2240;
  --accent: #f92aad;
  --accent-strong: #41e0d0;
  --accent-soft: rgba(249, 42, 173, 0.3);
  --text: #fce8ff;
  --muted: rgba(252, 232, 255, 0.78);
  --shadow: rgba(0, 0, 0, 0.55);
  --outline: rgba(249, 42, 173, 0.3);
  --particle-color: rgba(65, 224, 208, 0.7);
  --nav-bg: rgba(43, 33, 58, 0.88);
  --accent-text: #1a1425;
  background: linear-gradient(135deg, #2b213a 0%, #241b30 25%, #3d2d52 50%, #2b213a 75%, #1a1425 100%);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

body[data-theme="matrix"] {
  --bg: #0a0f0a;
  --bg-soft: #0d150d;
  --bg-deep: #050805;
  --card: #0d1a0d;
  --card-deep: #081208;
  --accent: #00ff41;
  --accent-strong: #39ff14;
  --accent-soft: rgba(0, 255, 65, 0.2);
  --text: #b8ffb8;
  --muted: rgba(184, 255, 184, 0.8);
  --shadow: rgba(0, 0, 0, 0.8);
  --outline: rgba(0, 255, 65, 0.25);
  --particle-color: rgba(0, 255, 65, 0.6);
  --nav-bg: rgba(5, 12, 5, 0.92);
  --accent-text: #0a0f0a;
  background: linear-gradient(180deg, #0a0f0a 0%, #0d150d 50%, #050805 100%);
}

body[data-theme="dracula"] {
  --bg: #282a36;
  --bg-soft: #343746;
  --bg-deep: #21222c;
  --card: #44475a;
  --card-deep: #363848;
  --accent: #ff79c6;
  --accent-strong: #bd93f9;
  --accent-soft: rgba(255, 121, 198, 0.28);
  --text: #f8f8f2;
  --muted: rgba(248, 248, 242, 0.7);
  --shadow: rgba(0, 0, 0, 0.5);
  --outline: rgba(189, 147, 249, 0.3);
  --particle-color: rgba(189, 147, 249, 0.6);
  --nav-bg: rgba(40, 42, 54, 0.9);
  --accent-text: #282a36;
  background: linear-gradient(-45deg, #282a36, #343746, #44475a, #282a36);
  background-size: 400% 400%;
  animation: gradient-shift 18s ease infinite;
}

body[data-theme="ocean-deep"] {
  --bg: #0a1929;
  --bg-soft: #0d2137;
  --bg-deep: #051320;
  --card: #0f2847;
  --card-deep: #0a1f38;
  --accent: #00d4ff;
  --accent-strong: #5ee7ff;
  --accent-soft: rgba(0, 212, 255, 0.25);
  --text: #e3f2fd;
  --muted: rgba(227, 242, 253, 0.78);
  --shadow: rgba(0, 0, 0, 0.55);
  --outline: rgba(0, 212, 255, 0.25);
  --particle-color: rgba(0, 212, 255, 0.7);
  --nav-bg: rgba(10, 25, 41, 0.9);
  --accent-text: #051320;
  background: linear-gradient(-45deg, #0a1929, #0d2137, #0a2a4a, #051320, #0a1929);
  background-size: 400% 400%;
  animation: gradient-shift 14s ease infinite;
}

body[data-theme="sciencerules"],
body[data-theme="void"] {
  --bg: #0a0a0f;
  --bg-soft: #12121a;
  --bg-deep: #050508;
  --card: #15151f;
  --card-deep: #0e0e14;
  --accent: #a855f7;
  --accent-strong: #c084fc;
  --accent-soft: rgba(168, 85, 247, 0.25);
  --text: #f5f3ff;
  --muted: rgba(245, 243, 255, 0.7);
  --shadow: rgba(0, 0, 0, 0.8);
  --outline: rgba(168, 85, 247, 0.3);
  --particle-color: rgba(168, 85, 247, 0.6);
  --nav-bg: rgba(10, 10, 15, 0.92);
  --accent-text: #0a0a0f;
  background: linear-gradient(-45deg, #0a0a0f, #12121a, #1a0a2e, #0a0a0f);
  background-size: 400% 400%;
  animation: gradient-shift 20s ease infinite;
}

.page,
.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 15px 32px 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.page-shell {
  gap: 12px;
}

 body.users-page .site-header {
  width: 100%;
}

 body.users-page .settings-content.users-container {
   margin-top: 0;
 }

.logo {
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.03em;
  text-transform: lowercase;
  margin: 10px auto 0;
  background: linear-gradient(135deg, #fff 20%, var(--accent-strong, #4d6bff) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 10px 24px var(--shadow);
}

.welcome-widget {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: 0 10px 20px var(--shadow);
  text-align: center;
}

.welcome-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  text-transform: lowercase;
}

.welcome-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-header {
  width: min(1200px, 92vw);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.site-header:not(.profile-site-header) h1,
.site-header:not(.profile-site-header) h2,
.page-shell h1,
.page-shell h2,
main h1,
main h2,
.home-hero h1,
.home-hero h2,
.home-hero p,
.users-hero-copy h1,
.users-hero-copy h2,
.users-hero-copy p,
.credits-hero-title,
.credits-hero-subtitle,
.movies-page-title,
.movies-page-subtitle,
.performance-title,
.popular-games-title,
.player-title,
.player-header h2,
.profile-section-header,
.modal-header h3,
.welcome-modal-content h2,
.welcome-step-label,
.construction-title,
.construction-message,
#launch-title,
#watch-title,
.home-recent-header,
.modal-body,
.credits-card h2,
.credits-row h2,
.not-found,
.not-found h1,
.not-found p,
.not-found a,
#theh1 {
  text-align: center;
}

.profile-site-header {
  text-align: left;
  justify-content: flex-start;
}

.profile-card .profile-head h1,
.profile-card .profile-head > div,
.profile-head h1,
.profile-head > div {
  text-align: left;
}

.user-item .user-head,
.user-item .user-title,
.user-item .user-display-name,
.user-item .user-username {
  text-align: left;
}

.site-header.centered {
  position: relative;
  flex-direction: column;
}

.site-header.centered .hamburger-menu {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1003;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-weight: 800;
  text-transform: lowercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 28px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.site-nav a {
  color: color-mix(in srgb, var(--text) 55%, transparent);
  text-decoration: none;
  padding: 6px;
  border-radius: 10px;
  border-bottom: none;
  transition: color 0.25s ease, background 0.25s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.site-nav a img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: brightness(0.7);
}

.site-nav a:hover img,
.site-nav a.active img {
  filter: brightness(1) drop-shadow(0 0 6px var(--accent-soft));
  transform: scale(1.1);
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

@media (min-width: 900px) {
  body:not(:has(.site-header.centered)) .site-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 72px;
    flex-direction: column;
    justify-content: center;
    border-radius: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg-deep) 98%, transparent) 0%, color-mix(in srgb, var(--bg) 98%, transparent) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
    gap: 6px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  }

  body:not(:has(.site-header.centered)) .site-nav a {
    padding: 14px 0;
    border-radius: 12px;
    margin: 0 8px;
    width: calc(100% - 16px);
    transition: all 0.25s ease;
    position: relative;
  }

  body:not(:has(.site-header.centered)) .site-nav a::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 24px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
    transition: transform 0.25s ease;
  }

  body:not(:has(.site-header.centered)) .site-nav a:hover,
  body:not(:has(.site-header.centered)) .site-nav a.active {
    background: rgba(255, 255, 255, 0.06);
  }

  body:not(:has(.site-header.centered)) .site-nav a.active::before {
    transform: translateY(-50%) scaleY(1);
  }

  body:not(:has(.site-header.centered)) .site-nav a:hover::before {
    transform: translateY(-50%) scaleY(0.6);
  }

  body:not(:has(.site-header.centered)) .site-nav a.active::before {
    transform: translateY(-50%) scaleY(1);
    box-shadow: 0 0 12px var(--accent-soft);
  }

  body:not(:has(.site-header.centered)) .site-nav a img {
    width: 26px;
    height: 26px;
  }

  body:not(:has(.site-header.centered)) .page-shell,
  body:not(:has(.site-header.centered)) .profile-page {
    margin-left: 72px;
    width: calc(100% - 72px);
    max-width: none;
  }

  body:not(:has(.site-header.centered)) .site-header {
    width: min(1200px, 92vw);
    margin-left: auto;
    margin-right: auto;
  }
}

.cards {
  width: min(980px, 92vw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 10px;
}

.card-grid {
  width: min(1100px, 92vw);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-deep) 100%);
  border-radius: 18px;
  min-height: 150px;
  box-shadow: 0 18px 30px var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  transform-style: preserve-3d;
  overflow: hidden;
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.04), transparent 40%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 12px;
}

.card h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 900;
  text-transform: lowercase;
}

.card p {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.5;
}

.game-card:hover .game-image {
  transform: scale(1.05);
}

.game-image {
  transition: transform 0.3s ease;
}

.links-card {
  width: min(1100px, 96vw);
}

.links-card .card-link {
  gap: 18px;
}

.links-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.6;
}

.links-list a {
  color: color-mix(in srgb, var(--text) 85%, transparent);
  text-decoration: none;
}

.links-list a:hover {
  color: var(--text);
  text-decoration: underline;
}

.themes-card .card-link {
  gap: 18px;
}

.control-btn {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--card) 0%, var(--card-deep) 100%);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.control-btn:hover,
.control-btn.active {
  transform: translateY(-2px);
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}

.theme-apply {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-text);
  font-weight: 900;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(6, 12, 34, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-apply:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(6, 12, 34, 0.45);
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-deep) 100%);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: lowercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 16px var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px var(--shadow);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--card) 100%);
}

.quick-btn:active {
  transform: translateY(0);
}

.quick-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.search-container {
  width: min(600px, 90%);
  display: flex;
  justify-content: center;
  margin: 18px 0;
  z-index: 2;
}

#search-form {
  display: flex;
  width: 100%;
  gap: 10px;
}

#site-search,
#game-search,
#movie-search,
#search-input,
#uv-address {
  flex: 1;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#site-search:focus,
#game-search:focus,
#movie-search:focus,
#search-input:focus,
#uv-address:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent), 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

#site-search:hover,
#game-search:hover,
#movie-search:hover,
#search-input:hover,
#uv-address:hover {
  border-color: var(--accent-soft);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

#site-search::placeholder,
#game-search::placeholder,
#movie-search::placeholder,
#search-input::placeholder,
#uv-address::placeholder {
  color: var(--muted);
  font-weight: 400;
  opacity: 0.8;
}

#search-form button {
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-text);
  cursor: pointer;
  box-shadow: 0 12px 24px var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#search-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px var(--shadow);
}

.users-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 18px 0;
}

.users-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: min(420px, 60%);
}

.users-search {
  flex: 1;
  padding: 10px 44px 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--card) 0%, var(--card-deep) 100%);
  box-shadow: 0 12px 24px var(--shadow);
  outline: none;
}

.users-search::placeholder {
  color: var(--muted);
}

.users-clear-btn {
  position: absolute;
  right: 6px;
  height: 32px;
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  transition: all 0.12s ease;
}

.users-clear-btn:hover {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  transform: translateY(-1px);
}

.users-total-count {
  margin: 0 8px;
  color: rgba(255,255,255,0.72);
  font-weight: 700;
}

@media (max-width: 640px) {
  .users-search-wrap { width: 100%; }
  .users-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .users-pagination { width: 100%; display: flex; justify-content: center; }
}

.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

#sort-dropdown,
.settings-select {
  padding: 12px 20px;
  padding-right: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  color: var(--text);
  font-weight: 700;
  outline: none;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  appearance: none;
  font-family: inherit;
}

.settings-select {
  width: 100%;
}

#sort-dropdown {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"),
    linear-gradient(180deg, var(--card) 0%, var(--card-deep) 100%);
  background-repeat: no-repeat, repeat;
  background-size: 12px, auto;
}

.settings-select option {
  background: var(--bg-deep);
  color: var(--text);
}

.hamburger-menu {
  display: none !important;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  margin: 0 0 4px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu:hover span {
  background: var(--accent);
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.apps-dropdown {
  position: fixed;
  top: 70px;
  left: 16px;
  background: color-mix(in srgb, var(--bg-deep) 95%, transparent);
  backdrop-filter: blur(20px);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 16px;
  z-index: 1002;
  min-width: 200px;
  box-shadow: 0 12px 32px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.apps-dropdown.show {
  opacity: 1;
  visibility: visible;
}

.apps-dropdown-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apps-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.apps-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.apps-dropdown-icon {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border-radius: 6px;
  overflow: hidden;
}

.apps-dropdown-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.apps-dropdown-info h4 {
  margin: 0 0 2px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--text);
}

.apps-dropdown-info p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.apps-dropdown-pin {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.apps-dropdown-pin:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.apps-dropdown-pin.pinned {
  opacity: 1;
  background: rgba(46, 255, 138, 0.2);
  color: rgba(46, 255, 138, 0.9);
}

.no-apps-message {
  display: grid;
  gap: 10px;
}

.apps-empty-cta {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  text-transform: lowercase;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.apps-empty-cta:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.quick-access {
  width: min(980px, 92vw);
  margin: 16px 0;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.ad-slot {
  width: min(760px, 92vw);
  min-height: 90px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ad-slot-inner {
  width: 728px;
  height: 90px;
  max-width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ad-slot iframe,
.ad-slot object,
.ad-slot embed {
  max-width: 100%;
  border-radius: 12px;
}

.ad-slot.secondary {
  width: min(640px, 84vw);
  background: rgba(255, 255, 255, 0.02);
}

.ad-slot.has-ad {
  padding: 14px;
  margin: 4px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ad-slot.secondary.has-ad {
  padding: 12px;
}

.ad-slot.ad-slot--collapsed {
  display: none !important;
}

.ad-fallback {
  width: min(760px, 92vw);
  min-height: 86px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px 20px;
}

.ad-fallback p {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.ad-fallback small {
  display: block;
  line-height: 1.35;
  max-width: 68ch;
}

.player-ad {
  position: fixed;
  z-index: 20;
  min-width: 280px;
  max-width: 360px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-ad.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

body[data-ad-position="top-left"] .player-ad {
  top: 16px;
  left: 16px;
}

body[data-ad-position="top-right"] .player-ad {
  top: 16px;
  right: 16px;
}

body[data-ad-position="bottom-left"] .player-ad {
  bottom: 16px;
  left: 16px;
}

body[data-ad-position="bottom-right"] .player-ad {
  bottom: 16px;
  right: 16px;
}

.global-ad-container {
  position: relative;
  width: min(1200px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: auto;
  gap: 8px;
  padding: 6px 0 2px;
  margin: 0 auto;
}

.global-ad-container::before {
  content: "sponsored";
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.18);
  margin-bottom: -2px;
}

.global-ad-container.hidden {
  display: none !important;
}

.player-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent);
  backdrop-filter: blur(10px);
  padding: 24px;
  z-index: 1200;
}

.player-content {
  width: min(1100px, 92vw);
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 60px var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  padding-bottom: 20px;
}

.player-header {
  padding: 14px 18px;
  background: color-mix(in srgb, var(--card-deep) 95%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-weight: 800;
}

.player-header span {
  font-size: 1rem;
}

.player-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.player-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.player-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.player-btn.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}

.player-select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.player-select option {
  background: var(--bg-deep);
  color: var(--text);
}

.player-iframe {
  width: 100%;
  height: min(65vh, 680px);
  border: none;
}

.player-content.is-maximized {
  position: fixed;
  inset: 20px;
  z-index: 1200;
  width: auto;
  max-width: none;
}

.player-content.is-maximized .player-iframe {
  height: calc(100vh - 120px);
}

.player-content:fullscreen {
  width: 100vw;
  height: 100vh;
  border: none;
  border-radius: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  margin: 0 !important;
}

.player-content:fullscreen .player-header {
  display: none !important;
}

.player-content:fullscreen .player-iframe {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  flex: 1;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.modal-backdrop,
.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 22, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
}

.login-modal {
  display: none;
  background-color: rgba(0, 0, 0, 0.7);
}

.login-modal.is-onboarding-auth {
  z-index: 2205;
}

.modal {
  width: min(680px, 92vw);
  background: var(--bg-deep);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-content {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-deep) 100%);
  margin: auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 80%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--card-deep) 95%, transparent);
  text-align: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

.modal-body {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}

.close-button {
  color: var(--muted);
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: var(--text);
  text-decoration: none;
}

.modal-content input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.modal-content input:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.modal-content button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-text);
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  font-weight: 800;
  font-family: inherit;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.modal-content button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent);
  filter: brightness(1.1);
}

.modal-content .google-btn {
  background-color: #db4437;
}

.modal-content .google-btn:hover {
  background-color: #c23321;
}

.modal-content p {
  color: var(--text);
  text-align: center;
  margin-bottom: 10px;
}

.modal-content .error-message {
  color: #ff6b6b;
  text-align: center;
  margin-top: 10px;
}

.modal-content button.preferred {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-strong) 50%, transparent);
}

.welcome-modal-content {
  width: min(580px, 92vw);
  max-width: 580px;
  gap: 16px;
  text-align: center;
}

.welcome-modal-content h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3.1vw, 1.65rem);
  font-weight: 900;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.welcome-step-label {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: lowercase;
}

.welcome-progress {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.welcome-progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--card) 74%, transparent);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.welcome-progress-dot.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

.welcome-step-card {
  display: none;
  gap: 10px;
  text-align: left;
}

.welcome-step-card.active {
  display: grid;
}

.welcome-step-card[data-welcome-step="1"] {
  text-align: center;
  gap: 14px;
}

.welcome-step-card[data-welcome-step="1"] .welcome-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 900;
}

.welcome-step-card[data-welcome-step="1"] .welcome-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

.welcome-step-card[data-welcome-step="2"] {
  text-align: center;
}

.welcome-step-card h3 {
  margin: 0;
  font-size: 1.03rem;
  color: var(--text);
  text-transform: lowercase;
  letter-spacing: 0.01em;
}

.welcome-step-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.welcome-login-status {
  color: var(--accent-strong) !important;
  font-size: 0.84rem;
  font-weight: 800;
}

.welcome-setup {
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--card) 75%, transparent);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.welcome-setup-row,
.welcome-setup-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}

.welcome-setup-row select,
.welcome-setup-row input[type="text"],
.welcome-setup-row input[type="url"] {
  width: min(56%, 230px);
  min-width: 140px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  color: var(--text);
  padding: 8px 10px;
  font-family: inherit;
  font-weight: 700;
  text-transform: lowercase;
}

.welcome-setup-row select:disabled,
.welcome-setup-row input:disabled {
  opacity: 0.5;
}

.welcome-setup-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.welcome-actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.welcome-actions .welcome-secondary,
.welcome-actions .welcome-guest {
  background: color-mix(in srgb, var(--card) 80%, transparent);
  color: var(--text);
  border: 1px solid var(--outline);
}

.welcome-actions .welcome-secondary:hover,
.welcome-actions .welcome-guest:hover {
  box-shadow: 0 8px 20px color-mix(in srgb, var(--shadow) 40%, transparent);
}

.welcome-actions .welcome-guest {
  color: var(--muted);
}

.welcome-next {
  width: 100%;
  margin-top: 6px;
}

.welcome-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(20%);
}

@media (max-width: 640px) {
  .welcome-setup-row,
  .welcome-setup-toggle {
    flex-direction: column;
    align-items: flex-start;
  }

  .welcome-setup-row select,
  .welcome-setup-row input[type="text"],
  .welcome-setup-row input[type="url"] {
    width: 100%;
  }
}

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

.info-row strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 6px;
}

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

.theme-card {
  background: color-mix(in srgb, var(--card) 60%, transparent);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--outline);
  display: grid;
  gap: 10px;
  min-height: 160px;
  overflow: hidden;
}

.theme-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  text-transform: lowercase;
}

.theme-preview {
  height: 70px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2e51ff, #09143a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.theme-card .theme-chip {
  justify-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-weight: 800;
}

.theme-preview.midnight { background: linear-gradient(-45deg, #020617, #0b153d, #1e293b, #0f1a3e); }
.theme-preview.neon-tide { background: linear-gradient(-45deg, #2e0249, #570a57, #091a2f, #a91079); }
.theme-preview.sunset-drive { background: linear-gradient(-45deg, #ff6b6b, #556270, #3a1c71, #d76d77); }
.theme-preview.ember-haze { background: linear-gradient(-45deg, #2b1417, #4a0e0e, #5c1515, #3a0505); }
.theme-preview.aurora-flow { background: linear-gradient(-45deg, #0f2027, #2a0e36, #002a2a, #1a003a); }
.theme-preview.starlight { background: linear-gradient(-45deg, #0b0d26, #1a1040, #0f1234, #0d0820); }
.theme-preview.dizzy { background: linear-gradient(-45deg, #0d0a0e, #1a0d12, #120810, #080508); }
.theme-preview.minty { background: linear-gradient(-35deg, #061a12, #0a2a1a, #052218, #0d1e16); }
.theme-preview.useawp { background: linear-gradient(180deg, #0f1912, #233c2d, #122018, #0c140f); }
.theme-preview.cyberpunk { background: linear-gradient(-45deg, #0d0221, #1a0840, #ff2a6d, #05d9e8); }
.theme-preview.synthwave { background: linear-gradient(-45deg, #2b213a, #f92aad, #41e0d0, #1a1425); }
.theme-preview.matrix { background: linear-gradient(-45deg, #0a0f0a, #0d1a0d, #00ff41, #050805); }
.theme-preview.dracula { background: linear-gradient(-45deg, #282a36, #44475a, #ff79c6, #bd93f9); }
.theme-preview.ocean-deep { background: linear-gradient(-45deg, #0a1929, #0d2137, #00d4ff, #051320); }
.theme-preview.sciencerules,
.theme-preview.void { background: linear-gradient(-45deg, #0a0a0f, #12121a, #a855f7, #1a0a2e); }

.theme-preview {
  background-size: 300% 300%;
  animation: themeShift 6s ease-in-out infinite;
}

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

.settings-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: min(1100px, 96vw);
  align-items: stretch;
}

.settings-layout {
  display: flex;
  gap: 30px;
  width: min(1100px, 96vw);
  align-items: flex-start;
}

.settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
}

.settings-content {
  flex: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 90%, transparent) 0%, color-mix(in srgb, var(--card-deep) 90%, transparent) 100%);
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  min-height: 400px;
  position: relative;
  z-index: 1;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 10px;
}

.setting-group {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.setting-group:hover {
  background: rgba(0, 0, 0, 0.42);
  border-color: rgba(255, 255, 255, 0.1);
}

.setting-group h3 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: lowercase;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-row label {
  font-size: 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.setting-row input,
.setting-row select {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 11px 14px;
  font-weight: 700;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.setting-row input:focus,
.setting-row select:focus {
  border-color: var(--accent-soft);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setting-row.cursor-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.setting-row.cursor-row label {
  flex: 0 0 auto;
}

.setting-row.cursor-row input[type="file"] {
  flex: 1 1 180px;
  min-width: 0;
}

.cursor-preview {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: none;
}

.cursor-preview[src]:not([src=""]) {
  display: block;
}

.setting-row .cursor-clear {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: lowercase;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.setting-row .cursor-clear:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.setting-label-block {
  display: block;
  font-size: 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.setting-toggle input {
  width: 42px;
  height: 22px;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.setting-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.setting-toggle input:checked {
  background: var(--accent);
}

.setting-toggle input:checked::after {
  transform: translateX(18px);
}

.tab-btn {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid transparent;
  color: var(--muted);
  text-align: left;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 14px;
  transition: all 0.25s ease;
  font-size: 0.88rem;
  text-transform: lowercase;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  transition: transform 0.25s ease;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow: 0 4px 16px var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn.active::before {
  transform: translateY(-50%) scaleY(1);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

#tab-profile.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-section {
  background: rgba(0, 0, 0, 0.30);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.profile-section[open] {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.38);
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.profile-section-header::-webkit-details-marker {
  display: none;
}

.profile-section-header::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
  opacity: 0.5;
}

.profile-section[open] > .profile-section-header::after {
  transform: rotate(45deg);
}

.profile-section-header:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.profile-section[open] > .profile-section-header {
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-section-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
}

.profile-card-section {
  text-align: left;
}

.profile-save-section {
  background: transparent;
  border: none;
  padding: 0;
}

.profile-save-section:hover {
  background: transparent;
  border-color: transparent;
}

.tab-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--outline);
}

.tab-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: lowercase;
}

.settings-panel {
  height: 100%;
}

.custom-theme-creator {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
}

.custom-theme-creator.active {
  display: block;
  animation: slideIn 0.3s ease;
}

.performance-hero {
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(0,0,0,0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.performance-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--text);
}

.performance-desc {
  margin: 0 0 20px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.performance-preset-select {
  max-width: 280px;
  font-size: 0.95rem;
}

.performance-features {
  margin: 20px 0 0;
  padding: 0 0 0 20px;
  font-size: 0.85rem;
  line-height: 1.85;
  color: var(--muted);
}

.performance-features li {
  margin-bottom: 6px;
}

.performance-features strong {
  color: var(--accent);
  font-weight: 700;
}

.color-input-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
}

.color-input-group input[type="color"] {
  border: none;
  width: 40px;
  height: 30px;
  cursor: pointer;
  background: none;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.app-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: color-mix(in srgb, var(--card) 40%, transparent);
  border: 1px solid var(--outline);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.app-item:hover {
  background: color-mix(in srgb, var(--card) 60%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px var(--shadow);
  border-color: rgba(255, 255, 255, 0.15);
}

.app-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border-radius: 12px;
  flex-shrink: 0;
}

.app-info {
  flex: 1;
}

.app-info h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: lowercase;
  color: var(--text);
}

.app-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.app-pin {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.app-pin:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.app-pin.pinned {
  opacity: 1;
  background: rgba(46, 255, 138, 0.2);
  color: rgba(46, 255, 138, 0.9);
}

.users-page .users-container {
  width: min(1080px, 94vw);
  margin-top: 0.4rem;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--outline);
  background:
    radial-gradient(circle at 85% -30%, rgba(255, 255, 255, 0.06), transparent 52%),
    linear-gradient(180deg, var(--card) 0%, var(--card-deep) 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.settings-content.users-container {
  flex: 0;
  min-height: 0;
}

.users-hero {
  margin-bottom: 16px;
}

.users-hero-copy h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.users-hero-copy p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}

.users-total-count {
  margin: 0;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

.users-pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.users-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.users-page-btn {
  border: 1px solid var(--outline);
  background: linear-gradient(180deg, var(--card) 0%, var(--card-deep) 100%);
  color: var(--text);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.users-page-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.users-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.users-page-label {
  min-width: 100px;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 720px) {
  .users-page .users-container {
    padding: 16px;
    border-radius: 16px;
  }

  .users-hero {
    margin-bottom: 12px;
  }

  .users-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .users-total-count {
    text-align: center;
  }
}

.profile-preview-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.profile-preview-image {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--outline);
  background: var(--card);
}

.profile-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-meta-line {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  word-break: break-all;
}

.profile-status-text {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

#profile-name,
#profile-bio,
#profile-photo {
  width: 100%;
}

#profile-bio {
  resize: vertical;
  min-height: 84px;
}

.save-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(46, 255, 138, 0.1);
  border: 1px solid rgba(46, 255, 138, 0.3);
  color: rgba(46, 255, 138, 0.9);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.save-indicator.show {
  opacity: 1;
}

.save-icon {
  font-size: 0.8rem;
}

.entry-phrase {
  margin: 15px 0 5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
}

.pill {
  background: color-mix(in srgb, var(--card) 60%, transparent);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid var(--outline);
}

.credits-page .page-shell {
  padding-top: 2rem;
}

.credits-hero {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 3rem 1rem 2rem;
}

.credits-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 20%, var(--accent-strong) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.credits-hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 600;
}

.credits-row {
  width: min(880px, 92vw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.credits-card {
  flex: 1 1 100%;
  max-width: 800px;
  padding: 2rem 2.25rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 56px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, transparent) 0%, color-mix(in srgb, var(--card-deep) 88%, transparent) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.credits-card-inner {
  display: block;
}

.credits-card h2 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-top: 1.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.credits-card h2:first-child {
  margin-top: 0;
}

.credits-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  text-transform: lowercase;
}

.credits-card a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 800;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.credits-card a:hover {
  color: var(--text);
  text-decoration: underline;
}

.settings-page .settings-layout {
  max-width: min(1100px, 96vw);
  margin: 0 auto;
}

.settings-page .settings-content {
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 24px 56px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.settings-page .tab-btn {
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.construction-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.construction-popup.show {
  opacity: 1;
  visibility: visible;
}

.construction-content {
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.construction-popup.show .construction-content {
  transform: scale(1);
}

.construction-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.construction-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--accent);
  text-transform: uppercase;
}

.construction-message {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 30px;
  line-height: 1.6;
}

.construction-close {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.construction-close:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 81, 255, 0.4);
}

.custom-popup {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: color-mix(in srgb, var(--bg-deep) 95%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--outline);
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 10px 30px var(--shadow);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.custom-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.popup-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

#login-button {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--nav-bg);
  border: 1px solid var(--outline);
  color: var(--text);
  padding: 5px;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 1003;
}

#login-button:hover {
  background: var(--card);
}

#login-button img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

#login-button span {
  padding: 0 10px 0 4px;
}

.profile-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  cursor: help;
}
.profile-badge.owner { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 75%, #000)); color: var(--accent-text, var(--text, #fff)); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 40%, transparent); }
.profile-badge.co-owner { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #a78bfa), color-mix(in srgb, var(--accent) 35%, #7c3aed)); color: var(--accent-text, var(--text, #fff)); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 35%, rgba(124, 58, 237, 0.5)); }
.profile-badge.admin { background: linear-gradient(135deg, #ff6b6b, #ff4b4b); color: #fff; box-shadow: 0 2px 10px rgba(255, 75, 75, 0.4); }
.profile-badge.mod { background: linear-gradient(135deg, #4fc3f7, #0288d1); color: #fff; box-shadow: 0 2px 10px rgba(2, 136, 209, 0.4); }

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .settings-container {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header {
    flex-direction: column;
  }

  .ad-slot {
    min-height: 50px;
  }

  .ad-slot-inner {
    width: 320px;
    height: 50px;
  }

  .ad-fallback {
    min-height: 66px;
  }

  .site-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 8px;
    border-radius: 16px;
  }

  .settings-content {
    padding: 20px 16px;
    border-radius: 16px;
    min-height: auto;
  }

  .profile-preview-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 800px) {
  .settings-layout {
    flex-direction: column;
  }

  .settings-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .apps-dropdown {
    top: 60px;
    left: 16px;
    right: auto;
    min-width: 180px;
  }

  .page,
  .page-shell {
    padding: 20px 16px 70px;
  }

  .cards {
    gap: 18px;
  }

  .site-header.centered {
    padding-top: 60px;
  }

  .search-container {
    width: 100%;
    max-width: none;
  }

  .search-input {
    font-size: 1rem;
    padding: 12px 16px;
  }

  .card-link {
    padding: 20px 16px;
  }

  .card h2 {
    font-size: 1.2rem;
  }

  .card p {
    font-size: 0.9rem;
  }

}

@media (max-width: 720px) {
  .page,
  .page-shell {
    padding: 32px 20px 80px;
  }

  .player-iframe {
    height: min(75vh, 600px);
    min-height: 400px;
  }
}

@media (max-width: 640px) {
  .page,
  .page-shell {
    padding: 16px 12px 72px;
    gap: 16px;
  }

  .logo {
    margin-top: 10px;
    text-align: center;
  }

  .site-header {
    width: 100%;
    gap: 10px;
  }

  .welcome-widget {
    width: 100%;
    padding: 9px 12px;
  }

  .welcome-title {
    font-size: 0.92rem;
  }

  .welcome-subtitle {
    font-size: 0.76rem;
    gap: 6px;
  }

  .cards {
    width: 100%;
    gap: 12px;
  }

  .settings-sidebar {
    gap: 6px;
    padding-bottom: 6px;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .modal-content {
    width: 92vw;
    max-width: 92vw;
    padding: 16px;
  }

  #login-button {
    top: 0.55rem;
    right: 0.55rem;
    font-size: 0.74rem;
  }

  #login-button img {
    width: 24px;
    height: 24px;
  }
}

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

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

.online-counter {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1500;
  width: 54px;
  height: 54px;
  cursor: default;
}

.online-counter:hover {
  width: auto;
  height: auto;
}

.online-counter > .online-dot {
  position: absolute;
  bottom: 22px;
  left: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: dotPulse 2s ease-in-out infinite;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.online-counter:hover > .online-dot {
  opacity: 0;
}

.online-counter .online-pill {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-deep) 92%, transparent) 0%, color-mix(in srgb, var(--bg) 95%, transparent) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px) scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.online-counter:hover .online-pill {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.online-counter .online-pill .online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  flex-shrink: 0;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(74, 222, 128, 0.5); }
  50% { box-shadow: 0 0 14px rgba(74, 222, 128, 0.8); }
}

@media (max-width: 900px) {
  .online-counter > .online-dot {
    bottom: 16px;
    left: 16px;
  }
  .online-counter .online-pill {
    bottom: 10px;
    left: 10px;
    padding: 7px 12px;
    font-size: 0.72rem;
  }
}

#uv-address {
  padding: 10px;
  font-size: 15px;
}

.global-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

.global-footer * {
  pointer-events: auto;
}

.global-footer-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 22px;
  border-radius: 50px 50px 0 0;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: none;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.global-footer-tab-handle {
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.global-footer:hover .global-footer-tab {
  width: 60px;
  height: 24px;
  background: var(--card);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.global-footer:hover .global-footer-tab-handle {
  width: 32px;
  background: rgba(255, 255, 255, 0.45);
}

.global-footer-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.global-footer.global-footer-expanded .global-footer-panel {
  max-height: 100px;
  opacity: 1;
}

.global-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 18px;
  padding: 12px 40px 14px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.01em;
}

.global-footer-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1px;
  flex-shrink: 0;
}

.global-footer-apps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.global-footer-apps:empty {
  display: none;
}

.global-footer-app {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-footer-app:hover {
  transform: translateY(-2px) scale(1.08);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.global-footer-app img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.global-footer-time {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
}

.global-footer-date {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

.global-footer-weather {
  color: var(--accent-strong, #6b8aff);
  font-weight: 600;
}

.global-footer-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.50);
}

.global-footer-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: dotPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .global-footer-tab {
    width: 44px;
    height: 18px;
  }
  .global-footer-tab-handle {
    width: 22px;
    height: 2.5px;
  }
  .global-footer:hover .global-footer-tab {
    width: 50px;
    height: 20px;
  }
  .global-footer-inner {
    gap: 0 12px;
    padding: 10px 16px 12px;
    font-size: 0.74rem;
  }
  .global-footer-sep {
    height: 12px;
  }
  .global-footer-app {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  .global-footer-app img {
    width: 14px;
    height: 14px;
  }
}

html {
  box-sizing: border-box;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  width: 100%;
}

.page-shell {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

iframe {
  max-width: 100%;
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1024px) {
  .site-header {
    flex-wrap: wrap;
    padding: 12px 20px;
  }
  
  .site-nav {
    gap: 12px;
  }
  
  .site-nav a img {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 10px 16px;
  }
  
  .logo {
    font-size: 1.2rem;
  }
  
  .site-nav {
    gap: 10px;
  }
  
  .site-nav a img {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 8px 12px;
  }
  
  .logo {
    font-size: 1rem;
  }
  
  .site-nav {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .site-nav a img {
    width: 18px;
    height: 18px;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .site-header {
    padding: 6px 12px;
  }
  
  .logo {
    font-size: 0.9rem;
  }
}

@media (min-width: 1920px) {
  .page-shell {
    max-width: 1800px;
  }
}

@media (min-width: 2560px) {
  .page-shell {
    max-width: 2200px;
  }
}

.modal-open {
  overflow: hidden;
}

@supports (height: 100dvh) {
  .player-shell,
  .movies-modal {
    height: 100dvh;
  }
}

@media (hover: none) and (pointer: coarse) {
  .game-tile:active .game-tile-overlay,
  .popular-game-item:active {
    opacity: 1;
    transform: scale(0.98);
  }
}
