@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-base: #1a1b1e;
  --bg-elevated: #232428;
  --bg-card: #2b2d31;
  --bg-hover: #35373c;
  --bg-input: #1e1f22;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-active: rgba(255, 255, 255, 0.18);

  --text-primary: #f2f3f5;
  --text-secondary: #b5bac1;
  --text-muted: #949ba4;

  --accent: #5865f2;
  --accent-light: #7289da;
  --accent-rgb: 88, 101, 242;
  --accent-glow: rgba(88, 101, 242, 0.15);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.4);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 100px;

  --sidebar-width: 240px;
  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

#blob-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  filter: blur(140px);
  opacity: 0.6;
  pointer-events: none;
}
#blob-bg .blob {
  position: absolute;
  will-change: transform;
}
#blob-bg .blob-1 {
  width: 80vw; height: 80vw;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.5) 0%, rgba(88, 101, 242, 0.15) 40%, transparent 70%);
  top: -20%; left: -15%;
  animation: blobMove1 28s ease-in-out infinite alternate, blobMorph1 35s ease-in-out infinite;
}
#blob-bg .blob-2 {
  width: 75vw; height: 75vw;
  background: radial-gradient(circle, rgba(114, 137, 218, 0.45) 0%, rgba(114, 137, 218, 0.12) 40%, transparent 70%);
  bottom: -25%; right: -10%;
  animation: blobMove2 32s ease-in-out infinite alternate, blobMorph2 40s ease-in-out infinite;
}
#blob-bg .blob-3 {
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, rgba(87, 242, 135, 0.3) 0%, rgba(87, 242, 135, 0.08) 40%, transparent 70%);
  top: 30%; left: 40%;
  animation: blobMove3 25s ease-in-out infinite alternate, blobMorph3 30s ease-in-out infinite;
}
#blob-bg .blob-4 {
  width: 85vw; height: 85vw;
  background: radial-gradient(circle, rgba(237, 66, 69, 0.3) 0%, rgba(237, 66, 69, 0.08) 40%, transparent 70%);
  top: 50%; left: -25%;
  animation: blobMove4 35s ease-in-out infinite alternate, blobMorph4 38s ease-in-out infinite;
}
@keyframes blobMove1 {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(25vw, 25vh) scale(1.25); }
  50%  { transform: translate(10vw, 45vh) scale(0.85); }
  75%  { transform: translate(35vw, 15vh) scale(1.15); }
  100% { transform: translate(20vw, 35vh) scale(1.05); }
}
@keyframes blobMove2 {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(-30vw, -20vh) scale(1.2); }
  50%  { transform: translate(-15vw, -40vh) scale(0.9); }
  75%  { transform: translate(-35vw, -10vh) scale(1.3); }
  100% { transform: translate(-20vw, -30vh) scale(1.1); }
}
@keyframes blobMove3 {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(-35vw, -15vh) scale(1.3); }
  50%  { transform: translate(-20vw, 20vh) scale(0.8); }
  75%  { transform: translate(-40vw, 10vh) scale(1.2); }
  100% { transform: translate(-25vw, -5vh) scale(1.1); }
}
@keyframes blobMove4 {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(30vw, -25vh) scale(1.15); }
  50%  { transform: translate(40vw, -15vh) scale(1.3); }
  75%  { transform: translate(15vw, -35vh) scale(0.9); }
  100% { transform: translate(25vw, -20vh) scale(1.2); }
}
@keyframes blobMorph1 {
  0%, 100% { border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%; }
  50% { border-radius: 55% 45% 45% 55% / 45% 55% 50% 50%; }
}
@keyframes blobMorph2 {
  0%, 100% { border-radius: 55% 45% 50% 50% / 45% 55% 40% 60%; }
  50% { border-radius: 45% 55% 55% 45% / 55% 45% 55% 45%; }
}
@keyframes blobMorph3 {
  0%, 100% { border-radius: 45% 55% 60% 40% / 50% 50% 45% 55%; }
  50% { border-radius: 55% 45% 45% 55% / 45% 55% 55% 45%; }
}
@keyframes blobMorph4 {
  0%, 100% { border-radius: 60% 40% 45% 55% / 40% 60% 50% 50%; }
  50% { border-radius: 45% 55% 55% 45% / 55% 45% 45% 55%; }
}

#sidebar {
  backdrop-filter: blur(40px) saturate(1.3);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
}
#content {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

svg.lucide, [data-lucide] {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

::selection {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-elevated); border-radius: 4px; }
::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #4e5058; }

#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: rgba(30, 31, 34, 0.92);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  z-index: 100;
  transition: transform var(--transition);
  position: relative;
}

.sidebar-header {
  padding: 0 8px 28px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.logo-svg {
  width: 100%;
  height: auto;
  display: block;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  position: relative;
  border: 1px solid transparent;
}

.nav-item i, .nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity var(--transition);
}

.nav-item span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  transform: translateX(2px);
}
.nav-item:hover i, .nav-item:hover svg { opacity: 0.7; }
.nav-item:hover span { color: var(--text-primary); }

.nav-item.active {
  background: rgba(88, 101, 242, 0.06);
  border-color: rgba(88, 101, 242, 0.1);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 55%;
  background: linear-gradient(180deg, #8b9fef, #5865f2);
  border-radius: 0 3px 3px 0;
}
.nav-item.active i, .nav-item.active svg {
  opacity: 1;
  color: #7c8aff;
}
.nav-item.active span {
  color: var(--text-primary);
  font-weight: 500;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.sidebar-version {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.5px;
}

#mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(30, 31, 34, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 90;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#mobile-menu-btn { padding: 6px; }
#mobile-menu-btn i, #mobile-menu-btn svg { width: 20px; height: 20px; opacity: 0.6; }
.mobile-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 1px;
}

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 95;
  opacity: 0;
  transition: opacity var(--transition);
}
#sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  #mobile-header { display: flex; }
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: var(--shadow-xl);
  }
  #sidebar.open { transform: translateX(0); }
  #content { margin-left: 0; padding-top: 56px; }
}

#content {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

.page {
  display: none;
  opacity: 0;
  min-height: 100%;
  padding: 48px 40px;
  will-change: transform, opacity;
  max-width: 1400px;
  margin: 0 auto;
}

.page.active {
  display: block;
  opacity: 1;
}

.page.page-enter {
  display: block;
  animation: pageIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.page.page-exit {
  display: block;
  animation: pageOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

@media (max-width: 768px) {
  .page { padding: 24px 16px; }
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  font-weight: 300;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.search-container {
  position: relative;
  max-width: 640px;
  margin: 0 auto 36px;
}
.search-container i, .search-container svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 14px 20px 14px 52px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 400;
  outline: none;
  transition: all var(--transition);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  background: var(--bg-elevated);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all var(--transition);
  border: 1px solid transparent;
  line-height: 1;
}
.btn i, .btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.btn-icon i, .btn-icon svg { width: 16px; height: 16px; opacity: 0.7; }

.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-chip {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-chip:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.filter-chip.active {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
}

.home-hero {
  text-align: center;
  padding: 80px 20px 60px;
  position: relative;
}

/* ── Game Showcase Marquee ── */
.hero-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.hero-content .btn,
.hero-content a,
.hero-content .title-spotlight {
  pointer-events: auto;
}
.game-showcase {
  position: absolute;
  inset: 0;
  z-index: 1;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, #000 40%, transparent 75%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: auto;
}
.game-marquee-row {
  display: flex;
  gap: 12px;
  width: max-content;
  position: relative;
}
.game-marquee-row.row-1 { animation: marqueeLeft 35s linear infinite; z-index: 3; }
.game-marquee-row.row-2 { animation: marqueeRight 40s linear infinite; margin-top: 12px; z-index: 2; }
.game-marquee-row.row-3 { animation: marqueeLeft 32s linear infinite; margin-top: 12px; z-index: 1; }
.game-marquee-row:hover { z-index: 10; }
.showcase-card {
  width: 140px;
  height: 90px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid transparent;
  background: var(--bg-card);
  position: relative;
  cursor: pointer;
  z-index: 1;
  opacity: 0.25;
  transition: transform 0.3s ease, opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}
.showcase-card:hover {
  opacity: 1;
  filter: brightness(1.2);
  transform: scale(1.8);
  z-index: 999;
  border-color: var(--accent);
  box-shadow: 0 0 50px rgba(var(--accent-rgb), 0.7), 0 16px 56px rgba(0,0,0,0.85);
  border-radius: var(--radius-md);
}
.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.showcase-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.showcase-card:hover .showcase-card-title {
  opacity: 1;
}
@keyframes marqueeLeft {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes marqueeRight {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.home-hero-logo {
  width: 220px;
  height: 220px;
  margin: 0 auto 32px;
  position: relative;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  perspective: 800px;
}
.home-hero-logo:hover {
  transform: scale(1.04);
}
.orb-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: orbRippleOut 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes orbRippleOut {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
.orb-glow {
  position: absolute;
  inset: -60%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.3) 0%, rgba(88, 101, 242, 0.1) 35%, transparent 65%);
  animation: orbGlow 4s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes orbGlow {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 1; }
}
.orb-body {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8b9fef 0%, #7c8aff 25%, #5865f2 50%, #4752c4 75%, #3b43a0 100%);
  box-shadow:
    inset -20px -20px 40px rgba(0, 0, 0, 0.4),
    inset 10px 10px 30px rgba(124, 138, 255, 0.2),
    0 0 60px rgba(88, 101, 242, 0.25),
    0 0 120px rgba(88, 101, 242, 0.1);
  transition: transform 0.1s ease-out;
  transform-style: preserve-3d;
  animation: orbFloat 6s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); }
  25% { transform: translateY(-6px) rotateX(3deg) rotateY(5deg); }
  50% { transform: translateY(0) rotateX(-2deg) rotateY(-3deg); }
  75% { transform: translateY(4px) rotateX(2deg) rotateY(-4deg); }
}
.orb-highlight {
  position: absolute;
  width: 35%;
  height: 35%;
  top: 22%;
  left: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.15) 40%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
  transition: left 0.15s ease-out, top 0.15s ease-out;
}
#hero-orb canvas {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  z-index: 1;
}

.home-hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 8px;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: none;
  position: relative;
}
.home-hero h1::after {
  content: 'HORIZON';
  position: absolute;
  inset: 0;
  color: var(--accent);
  filter: blur(35px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}
@keyframes shimmerText {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.home-hero p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 40px;
  line-height: 1.8;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  perspective: 800px;
}

.feature-card {
  text-align: center;
  padding: 32px 24px 28px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}
.feature-card:hover {
  background: var(--bg-hover);
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.3), rgba(124, 138, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.feature-card:hover::before { opacity: 1; }
.feature-card .feature-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(88, 101, 242, 0.06);
  border: 1px solid rgba(88, 101, 242, 0.1);
}
.feature-card .feature-icon i,
.feature-card .feature-icon svg {
  width: 18px;
  height: 18px;
  opacity: 0.6;
  color: #7c8aff;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 300;
}

.announcements {
  max-width: 600px;
  margin: 56px auto 0;
}
.announcements h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}
.announcements h2 i, .announcements h2 svg { width: 16px; height: 16px; opacity: 0.5; }
.announcement-item {
  padding: 18px 22px;
  margin-bottom: 10px;
}
.announcement-item .ann-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.announcement-item .ann-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 300;
}

.proxy-container {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding-top: 40px;
}

.proxy-search-wrap { margin: 40px 0 20px; }

.proxy-engine-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}
.engine-btn {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.engine-btn i, .engine-btn svg { width: 16px; height: 16px; }
.engine-btn.active {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
}
.engine-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.proxy-frame-wrap {
  display: none;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 500;
  background: var(--bg-base);
  flex-direction: column;
}
.proxy-frame-wrap.active { display: flex; }

.proxy-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.proxy-url-display {
  flex: 1;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.proxy-frame {
  flex: 1;
  width: 100%;
  border: none;
  min-height: 0;
}

@media (max-width: 768px) { .proxy-frame-wrap { left: 0; } }

.games-header {
  text-align: center;
  margin-bottom: 8px;
}

.game-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.35s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.game-card:hover {
  transform: translateY(-4px);
  background: var(--bg-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}
.game-card:hover .game-thumb img {
  transform: scale(1.05);
}

.game-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.game-thumb .game-thumb-placeholder {
  opacity: 0.15;
}
.game-thumb .game-thumb-placeholder i,
.game-thumb .game-thumb-placeholder svg {
  width: 32px;
  height: 32px;
}

.game-info {
  padding: 14px 16px;
}
.game-info h3 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.game-info .game-category {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.game-viewer {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 96px);
  gap: 20px;
}

.gv-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.gv-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.gv-iframe-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
}
.gv-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.gv-iframe-wrap.focused {
  border-color: rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

.gv-suggestions { flex-shrink: 0; }
.gv-suggestions h3 {
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--text-muted);
}
.gv-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.gv-suggest-card {
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
}
.gv-suggest-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.gv-suggest-card .suggest-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gv-suggest-card .suggest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gv-suggest-card .suggest-title {
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .gv-suggestions-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .gv-suggestions-grid { grid-template-columns: repeat(2, 1fr); }
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 16px;
  cursor: pointer;
}
.app-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  border: 1px solid var(--border-subtle);
}
.app-icon i, .app-icon svg { width: 22px; height: 22px; }
.app-card:hover .app-icon { transform: scale(1.08); }
.app-name {
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  color: var(--text-secondary);
}

.settings-container {
  max-width: 640px;
  margin: 0 auto;
}

.settings-group { margin-bottom: 36px; }
.settings-group-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.settings-group-title i, .settings-group-title svg {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  margin-bottom: 8px;
}
.setting-label { flex: 1; }
.setting-label h4 {
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 3px;
  color: var(--text-primary);
}
.setting-label p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 300;
}
.setting-control {
  flex-shrink: 0;
  margin-left: 16px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all var(--transition);
}
.toggle input:checked + .toggle-slider {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.3);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.setting-input {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.82rem;
  width: 200px;
  outline: none;
  transition: all var(--transition);
}
.setting-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15); }

.setting-select {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.82rem;
  outline: none;
  appearance: none;
  cursor: pointer;
  min-width: 160px;
}

.panic-key-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.panic-key-display:hover { border-color: var(--border-hover); }
.panic-key-display i, .panic-key-display svg { width: 16px; height: 16px; opacity: 0.5; }
.panic-key-display kbd {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: 'Poppins', monospace;
  font-size: 0.78rem;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  border-top-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i, .empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.2; }
.empty-state p { font-size: 0.88rem; font-weight: 300; }

.stagger-item {
  opacity: 0;
  transform: translateY(10px);
  animation: staggerIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes staggerIn {
  to { opacity: 1; transform: translateY(0); }
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 400;
  z-index: 1000;
  box-shadow: var(--shadow-xl);
  animation: toastIn 0.3s ease forwards;
}
.toast.toast-out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}

/* ── AI Chat ── */
.ai-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
}
.ai-model-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ai-model-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.ai-model-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.ai-model-btn.active {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
  min-height: 0;
}
.ai-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
  line-height: 1.6;
}
.ai-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.ai-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
}
.ai-msg.user .ai-msg-avatar { background: var(--accent); color: #fff; }
.ai-msg.assistant .ai-msg-avatar { background: var(--bg-hover); color: var(--accent); }
.ai-msg-content {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  color: var(--text-primary);
  word-wrap: break-word;
  white-space: pre-wrap;
}
.ai-msg.user .ai-msg-content {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg.assistant .ai-msg-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}
.ai-msg-content code {
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.82rem;
}
.ai-msg-content pre {
  background: rgba(0,0,0,0.3);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 8px 0;
}
.ai-msg-content pre code {
  background: none;
  padding: 0;
}
.ai-input-bar {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.ai-input {
  flex: 1;
  padding: 12px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  resize: none;
  font-family: inherit;
  min-height: 44px;
  max-height: 120px;
}
.ai-input:focus { border-color: var(--accent); }
.ai-input::placeholder { color: var(--text-muted); }
.ai-send-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background var(--transition);
  flex-shrink: 0;
}
.ai-send-btn:hover { background: #4752c4; }
.ai-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ai-send-btn i, .ai-send-btn svg { width: 18px; height: 18px; }
.ai-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
}
.ai-empty i, .ai-empty svg { width: 48px; height: 48px; opacity: 0.2; }
.ai-empty p { font-size: 0.9rem; }
.ai-typing { opacity: 0.5; font-style: italic; }

.showcase-popup {
  position: absolute;
  z-index: 100;
  width: 140px;
  height: 90px;
  transform: translate(-50%, -50%) scale(1.8);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--accent);
  box-shadow: 0 0 50px rgba(var(--accent-rgb), 0.7), 0 16px 56px rgba(0,0,0,0.85);
  cursor: pointer;
  pointer-events: none;
  transition: opacity 0.15s ease;
  display: none;
}
.showcase-popup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.showcase-popup .showcase-card-title {
  opacity: 1;
}