/* ===================================================================
   Yxway Design System
   Light gaming theme - warm coral with playful accents
   =================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #FAFBFE;
  color: #2D3436;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #FAFBFE;
  --bg2: #EEF1F8;
  --bg3: #DDE3F0;
  --card: #FFFFFF;
  --card-hover: #F5F8FF;
  --fg: #1A1D2E;
  --fg2: #5A6178;
  --fg3: #A0A8BE;
  --primary: #4F6BFF;
  --primary-l: #7B8FFF;
  --primary-d: #3A52E0;
  --accent: #FF6B9D;
  --accent-l: #FF9DBF;
  --violet: #8B5CF6;
  --violet-l: #B794F6;
  --warm: #FFB547;
  --pink: #FF6B9D;
  --red: #EF4444;
  --green: #10B981;
  --blue: #3B82F6;
  --orange: #F97316;
  --grad1: linear-gradient(135deg, #4F6BFF, #8B5CF6);
  --grad2: linear-gradient(135deg, #FF6B9D, #FFB547);
  --grad3: linear-gradient(135deg, #10B981, #3B82F6);
  --grad4: linear-gradient(135deg, #8B5CF6, #FF6B9D);
  --grad5: linear-gradient(135deg, #FFB547, #F97316);
  --r1: 10px;
  --r2: 16px;
  --r3: 22px;
  --r4: 30px;
  --sh1: 0 2px 8px rgba(79, 107, 255, 0.06);
  --sh2: 0 4px 20px rgba(79, 107, 255, 0.08);
  --sh3: 0 8px 36px rgba(79, 107, 255, 0.12);
  --sh4: 0 12px 48px rgba(79, 107, 255, 0.18);
  --border: #E2E8F0;
  --border-l: #CBD5E1;
}

/* ---------- Layout ---------- */
.yx-container {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 720px) {
  .yx-container {
    padding: 0 16px;
  }
}

/* ---------- Header ---------- */
.yx-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.yx-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.yx-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 20px;
}

.yx-logo img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.yx-logo-text {
  background: var(--grad1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 22px;
  font-weight: 900;
}

.yx-header-search {
  display: none;
}

.yx-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.yx-nav a {
  padding: 8px 14px;
  border-radius: var(--r2);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg2);
  transition: all 0.2s;
  white-space: nowrap;
}

.yx-nav a:hover,
.yx-nav a.yx-nav-active {
  color: var(--primary);
  background: rgba(79, 107, 255, 0.08);
}

.yx-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r1);
  background: var(--bg2);
  margin-left: auto;
  flex-shrink: 0;
}

.yx-nav-toggle img {
  width: 20px;
  height: 20px;
}

.yx-mobile-nav {
  display: none;
  flex-direction: column;
  padding: 12px 16px;
  gap: 2px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--sh2);
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 99;
}

.yx-mobile-nav.yx-mobile-nav-open {
  display: flex;
}

.yx-mobile-nav a {
  padding: 12px 16px;
  border-radius: var(--r1);
  font-size: 15px;
  color: var(--fg);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.yx-mobile-nav a:last-child {
  border-bottom: none;
}

.yx-mobile-nav a:hover {
  background: var(--bg2);
  color: var(--primary);
}

@media (max-width: 1200px) {
  .yx-nav {
    display: none;
  }

  .yx-nav-toggle {
    display: flex;
  }
}

@media (max-width: 600px) {
  .yx-header-inner {
    padding: 10px 14px;
    gap: 10px;
  }

  .yx-logo {
    font-size: 17px;
  }

  .yx-logo img {
    width: 36px;
    height: 36px;
  }

  .yx-logo-text {
    font-size: 18px;
  }
}

/* ---------- Footer ---------- */
.yx-footer {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  padding: 56px 24px 28px;
  background: #1A1D2E;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.yx-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}

.yx-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.yx-footer-brand .yx-logo {
  font-size: 18px;
}

.yx-footer-brand .yx-logo-text {
  background: var(--grad1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.yx-footer-brand p {
  font-size: 14px;
  color: #94A3B8;
  max-width: 300px;
  line-height: 1.65;
}

.yx-footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 14px;
  font-weight: 700;
}

.yx-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.yx-footer-col a {
  font-size: 14px;
  color: #94A3B8;
  transition: color 0.2s;
}

.yx-footer-col a:hover {
  color: var(--primary);
}

.yx-footer-bottom {
  max-width: 1320px;
  margin: 36px auto 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #64748B;
}

@media (max-width: 860px) {
  .yx-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 540px) {
  .yx-footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- Game Card ---------- */
.yx-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
  cursor: pointer;
  display: block;
}

.yx-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 36px rgba(79,107,255,.18);
  border-color: var(--primary);
  z-index: 2;
}

.yx-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--bg2);
  border-radius: var(--r3) var(--r3) 0 0;
}

.yx-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.yx-card:hover .yx-card-img img {
  transform: scale(1.06);
}

.yx-card-play {
  position: absolute;
  inset: 0;
  background: rgba(45, 52, 54, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s;
}

.yx-card:hover .yx-card-play {
  opacity: 1;
}

.yx-card-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: var(--sh4);
  transform: scale(0.85);
  transition: transform 0.28s;
}

.yx-card:hover .yx-card-play-btn {
  transform: scale(1);
}

.yx-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(79, 107, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  z-index: 1;
}

.yx-card-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(139, 92, 246, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  z-index: 1;
}

.yx-card-body {
  padding: 14px 16px 16px;
}

.yx-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
}

.yx-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg3);
}

.yx-card-type {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.yx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--r2);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.yx-btn-primary {
  background: var(--grad1);
  color: #fff;
  box-shadow: var(--sh4);
}

.yx-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(79, 107, 255, 0.3);
}

.yx-btn-ghost {
  background: var(--bg2);
  color: var(--fg);
  border: 1px solid var(--border);
}

.yx-btn-ghost:hover {
  background: var(--bg3);
  border-color: var(--primary);
  color: var(--primary);
}

.yx-btn-pill {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 999px;
}

.yx-play-btn {
  background: var(--grad1);
  color: #fff;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: var(--r2);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--sh4);
}

.yx-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(79, 107, 255, 0.35);
}

.yx-play-icon {
  font-size: 14px;
}

/* ---------- Category Pills ---------- */
.yx-cat-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.yx-cat-pill {
  padding: 9px 18px;
  border-radius: var(--r2);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.22s;
  white-space: nowrap;
  cursor: pointer;
}

.yx-cat-pill:hover {
  color: var(--primary);
  border-color: rgba(79, 107, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: var(--sh1);
}

.yx-cat-pill.yx-cat-pill-active {
  background: var(--grad1);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--sh4);
}

.yx-cat-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.yx-cat-pill-icon {
  font-size: 14px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Section Heading ---------- */
.yx-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 56px 0 22px;
  flex-wrap: wrap;
}

.yx-section-head h2 {
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
}

.yx-section-head .yx-section-sub {
  color: var(--fg2);
  font-size: 14px;
  margin-top: 6px;
}

.yx-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(79, 107, 255, 0.1);
  border: 1px solid rgba(79, 107, 255, 0.2);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.yx-section-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  padding: 8px 16px;
  border-radius: var(--r2);
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.yx-section-more:hover {
  background: rgba(79, 107, 255, 0.08);
  transform: translateX(3px);
}

/* ---------- Standard Grid ---------- */
.yx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .yx-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .yx-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ---------- Masonry ---------- */
.yx-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 18px;
}

.yx-masonry .yx-card {
  display: block;
}

@media (max-width: 1100px) {
  .yx-masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .yx-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .yx-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ---------- More Section ---------- */
.yx-more-section {
  margin-top: 56px;
}

.yx-load-more-wrap {
  text-align: center;
  margin: 36px 0 0;
}

.yx-load-more {
  padding: 13px 34px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  color: var(--fg);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.22s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.yx-load-more:hover {
  background: var(--grad1);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--sh4);
}

.yx-load-more[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Scroll Actions ---------- */
.yx-scroll-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}

.yx-scroll-actions button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s;
  box-shadow: var(--sh2);
}

.yx-scroll-actions button:hover {
  background: var(--primary-d);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--sh4);
}

.yx-scroll-actions button img {
  width: 20px;
  height: 20px;
}

/* ---------- Iframe Box ---------- */
.yx-iframe-box {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 10;
}

.yx-iframe-box iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  overflow: hidden;
}

/* ---------- Play Page Layout ---------- */
.yx-play-wrap {
  position: relative;
  z-index: 1;
  padding: 36px 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.yx-play-iframe-wrap {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 32px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(79,107,255,.18);
}

.yx-play-iframe-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Fullscreen button */
.yx-fs-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  opacity: 0;
  line-height: 1;
  padding: 0;
}

.yx-play-iframe-wrap:hover .yx-fs-btn {
  opacity: 1;
}

.yx-fs-btn:hover {
  background: rgba(79,107,255,0.8);
  transform: scale(1.1);
}

/* Fullscreen active state */
.yx-play-iframe-wrap.yx-fs-active {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  z-index: 9999;
  aspect-ratio: unset;
}

.yx-play-iframe-wrap.yx-fs-active iframe {
  width: 100%;
  height: 100%;
}

.yx-play-info {
  max-width: 960px;
  margin: 0 auto 40px;
}

.yx-play-info h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--text);
}

.yx-play-desc {
  margin: 16px 0;
  line-height: 1.75;
  color: var(--text-secondary);
  font-size: .97rem;
}

.yx-play-controls {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
}

.yx-play-controls h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.yx-play-controls p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.yx-play-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ---------- Detail Page ---------- */
.yx-detail-wrap {
  position: relative;
  z-index: 1;
  padding: 36px 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.yx-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fg2);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 22px;
  padding: 8px 14px;
  border-radius: var(--r2);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.yx-detail-back:hover {
  color: var(--primary);
  border-color: rgba(79, 107, 255, 0.3);
  transform: translateX(-3px);
}

.yx-detail-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
}

.yx-detail-info {
  width: 100%;
  text-align: center;
}

.yx-detail-poster {
  position: relative;
  max-width: 480px;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--r3);
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: var(--sh2);
}

.yx-detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yx-detail-info h1 {
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 14px;
  color: var(--fg);
}

/* ---------- Favorite Button ---------- */
.yx-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  font-size: 20px;
  color: var(--fg3);
  cursor: pointer;
  transition: all 0.25s;
  margin-left: 10px;
  vertical-align: middle;
  line-height: 1;
  padding: 0;
}

.yx-fav-btn:hover {
  border-color: #e74c3c;
  color: #e74c3c;
  transform: scale(1.1);
}

.yx-fav-btn.yx-fav-active {
  color: #e74c3c;
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
}

.yx-detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  justify-content: center;
}

.yx-detail-tag {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--fg2);
}

.yx-detail-tag.yx-tag-rating {
  background: rgba(253, 203, 110, 0.2);
  border-color: rgba(253, 203, 110, 0.4);
  color: #E17055;
}

.yx-detail-tag.yx-tag-type {
  background: rgba(79, 107, 255, 0.1);
  border-color: rgba(79, 107, 255, 0.25);
  color: var(--primary);
}

.yx-detail-desc {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--fg2);
  margin-bottom: 26px;
}

.yx-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.yx-tips-card {
  margin-top: 28px;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  box-shadow: var(--sh1);
}

.yx-tips-card h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}

.yx-tips-card h3 .yx-tips-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r1);
  background: var(--grad1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.yx-tips-card p {
  color: var(--fg2);
  line-height: 1.7;
  margin-bottom: 9px;
  font-size: 14px;
}

.yx-tips-card p strong {
  color: var(--fg);
}

/* ---------- 404 Page ---------- */
.yx-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  background: var(--bg);
}

.yx-404-inner {
  max-width: 560px;
}

.yx-404-code {
  font-size: clamp(100px, 18vw, 180px);
  font-weight: 900;
  line-height: 1;
  background: var(--grad1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  letter-spacing: -0.05em;
}

.yx-404-title {
  font-size: clamp(22px, 3.6vw, 32px);
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--fg);
}

.yx-404-sub {
  color: var(--fg2);
  margin-bottom: 28px;
  font-size: 15px;
}

.yx-404-search {
  display: flex;
  max-width: 440px;
  margin: 0 auto 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: var(--sh2);
}

.yx-404-search input {
  flex: 1;
  padding: 13px 18px;
  background: transparent;
  border: 0;
  color: var(--fg);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.yx-404-search input::placeholder {
  color: var(--fg3);
}

.yx-404-search button {
  padding: 0 22px;
  background: var(--grad1);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.yx-404-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.yx-404-link {
  padding: 7px 14px;
  border-radius: var(--r2);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--fg2);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.yx-404-link:hover {
  color: var(--primary);
  border-color: rgba(79, 107, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--sh1);
}

.yx-404-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 28px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.yx-404-game {
  aspect-ratio: 4 / 3;
  border-radius: var(--r2);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.22s;
}

.yx-404-game:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 107, 255, 0.3);
  box-shadow: var(--sh2);
}

.yx-404-game img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yx-404-game-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(0deg, rgba(45, 52, 54, 0.85), transparent);
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Text Page ---------- */
.yx-page {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 24px 56px;
}

.yx-page h1 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.yx-page h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin: 28px 0 10px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--bg2);
}

.yx-page h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  margin: 18px 0 7px;
}

.yx-page p {
  color: var(--fg2);
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 14.5px;
}

.yx-page ul {
  margin: 10px 0 14px 18px;
  color: var(--fg2);
}

.yx-page ul li {
  margin-bottom: 7px;
  line-height: 1.6;
  font-size: 14.5px;
}

.yx-page a {
  color: var(--primary);
  text-decoration: underline;
}

.yx-page a:hover {
  color: var(--primary-d);
}

.yx-page-date {
  font-size: 12px;
  color: var(--fg3);
  margin-bottom: 22px;
}

.yx-page strong {
  color: var(--fg);
}

/* FAQ */
.yx-faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 18px 22px;
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
}

.yx-faq-item:hover {
  box-shadow: var(--sh1);
  border-color: rgba(79, 107, 255, 0.2);
}

.yx-faq-item h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
  color: var(--fg);
}

.yx-faq-item p {
  margin: 0;
  font-size: 13.5px;
}

/* ---------- Empty ---------- */
.yx-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--fg3);
}

.yx-empty-icon {
  font-size: 44px;
  margin-bottom: 14px;
  opacity: 0.5;
}

.yx-empty-text {
  font-size: 15px;
}

/* ---------- Utility ---------- */
.yx-hidden {
  display: none !important;
}

.yx-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Animations ---------- */
@keyframes yx-pulse {
  0%, 100% {
    box-shadow: 0 0 16px rgba(79, 107, 255, 0.15);
  }

  50% {
    box-shadow: 0 0 32px rgba(79, 107, 255, 0.3);
  }
}

@keyframes yx-float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.yx-anim-float {
  animation: yx-float 6s ease-in-out infinite;
}

.yx-anim-pulse {
  animation: yx-pulse 2.5s ease-in-out infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .yx-section-head {
    margin: 36px 0 16px;
  }

  .yx-scroll-actions {
    right: 10px;
    bottom: 10px;
  }

  .yx-scroll-actions button {
    width: 40px;
    height: 40px;
  }
}
