* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: linear-gradient(180deg, #0c0c1a 0%, #12122a 100%); color: #e2e8f0; min-height: 100vh; }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
img { max-width: 100%; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 10px 14px; border-radius: 8px; background: #fff; color: #111827; font-weight: 700; text-decoration: none; transform: translateY(-160%); transition: transform 0.15s ease; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
header { background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%); padding: 14px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 20px rgba(79,70,229,0.3); }
header .container { display: flex; align-items: center; justify-content: space-between; }
header .logo { font-size: 1.5rem; font-weight: bold; color: #fff; text-decoration: none; }
header .logo img { display: block; }
header .icon_sea, header .icon_top { cursor: pointer; padding: 8px; }
header .icon_sea img, header .icon_top img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.legal-header-link { min-width: 92px; padding: 8px; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.legal-header-link:last-child { text-align: right; }
.legal-header-link:hover { text-decoration: underline; }

/* Breadcrumb */
.crumb { padding: 16px 0; font-size: 14px; color: #94a3b8; }
.crumb a { color: #818cf8; text-decoration: none; }
.crumb p { display: inline; color: #fff; }

/* Video / Game Area */
.video { background: rgba(30,27,75,0.6); border-radius: 16px; overflow: hidden; margin-bottom: 24px; border: 1px solid rgba(99,102,241,0.2); }
.playGame { position: relative; aspect-ratio: 16/9; max-height: 500px; }
.videoGame { width: 100%; height: 100%; position: relative; }
.iframe_img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #1e1b3d; position: relative; }
.iframe_img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.game-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 200px; }
.bbc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); }
.bbc a { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; padding: 16px 48px; border-radius: 12px; text-decoration: none; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 15px rgba(99,102,241,0.4); }
.bbc a:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(99,102,241,0.5); }
.game_iframe { display: none; width: 100%; height: 100%; border: none; }
.playGame.playing .iframe_img { display: none; }
.playGame.playing .game_iframe { display: block; }
.playGame .back { position: absolute; top: 16px; left: 16px; color: #fff; font-size: 24px; z-index: 10; display: none; padding: 8px 12px; background: rgba(0,0,0,0.5); border-radius: 8px; text-decoration: none; }
.playGame.playing .back { display: block; }
.playGame .back:hover { background: rgba(99,102,241,0.8); }
.playGame .fsBtn { position: absolute; top: 16px; right: 16px; color: #fff; font-size: 18px; z-index: 10; display: none; padding: 8px 12px; background: rgba(0,0,0,0.5); border-radius: 8px; text-decoration: none; }
.playGame.playing .fsBtn { display: block; }
.playGame .fsBtn:hover { background: rgba(99,102,241,0.8); }
.playGame:fullscreen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; }
.playGame:-webkit-full-screen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; }
.playGame:-moz-full-screen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; }
.playGame:-ms-fullscreen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; }
.playName { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.playName h3 { font-size: 1.25rem; }
.rate { display: flex; align-items: center; gap: 8px; }
.rate .star { color: #fbbf24; }
.addZ { display: flex; align-items: center; gap: 8px; color: #94a3b8; cursor: pointer; text-decoration: none; }
.addZ .icon { width: 24px; height: 24px; background: #334155; border-radius: 50%; }
.addZ.active .icon { background: #6366f1; }

/* Play Box */
.playBox { margin: 24px 0; }
.module { background: rgba(30,27,75,0.5); border-radius: 14px; padding: 20px; margin-bottom: 16px; border: 1px solid rgba(99,102,241,0.15); }
.module h2 { font-size: 1.1rem; margin-bottom: 12px; color: #818cf8; }
.module p { color: #94a3b8; line-height: 1.6; font-size: 14px; }
.mobile-tip { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 12px; background: rgba(99,102,241,0.1); border-radius: 10px; }
.mobile-tip i { color: #818cf8; margin-top: 2px; }

/* Games Grid */
.games { margin: 24px 0; }
.games h2 { font-size: 1.25rem; margin-bottom: 16px; padding-left: 4px; }
.game-section { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid rgba(99,102,241,0.2); }
.game-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.section-title { font-size: 1.1rem; color: #818cf8; margin-bottom: 16px; padding-left: 4px; }
.no-results { color: #64748b; padding: 24px; text-align: center; }
.gamelist { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
.gamelist li a { display: block; text-decoration: none; color: inherit; background: rgba(30,27,75,0.6); border-radius: 14px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; position: relative; border: 1px solid rgba(99,102,241,0.15); }
.gamelist li a:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(99,102,241,0.2); }
.gamelist .thumb { aspect-ratio: 1; background: #1e1b3d; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.gamelist .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gamelist dl { padding: 12px; }
.gamelist dt { font-size: 14px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gamelist dd { font-size: 12px; color: #64748b; display: flex; gap: 12px; }
.gamelist .card-badge { position: absolute; top: 4px; left: 4px; width: 36px; height: 22px; z-index: 1; }

/* Category Box */
.categoryBox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 200; }
.categoryBox.show { display: block; }
.categoryBox .box { background: #1e1b3d; max-width: 400px; margin: 20px auto; border-radius: 16px; padding: 24px; position: relative; border: 1px solid rgba(99,102,241,0.2); }
.categoryBox .close { position: absolute; top: 16px; right: 16px; cursor: pointer; font-size: 24px; }
.categoryBox .navList { list-style: none; margin-bottom: 24px; }
.categoryBox .navList a { color: #e2e8f0; text-decoration: none; display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.categoryBox .cate h2 { font-size: 1rem; margin-bottom: 12px; color: #818cf8; }
.catelist { list-style: none; }
.catelist a { display: flex; align-items: center; gap: 8px; padding: 10px 0; color: #94a3b8; text-decoration: none; }
.catelist a:hover { color: #818cf8; }

/* Search Box */
.searchBox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 200; }
.searchBox.show { display: block; }
.searchBox .comMain { padding: 20px; }
.searchBox .searB { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.searchBox .searB .back { cursor: pointer; font-size: 24px; }
.searchBox .searchMain { display: flex; flex: 1; background: #1e1b3d; border-radius: 10px; overflow: hidden; border: 1px solid rgba(99,102,241,0.2); }
.searchBox input { flex: 1; padding: 12px 16px; border: none; background: transparent; color: #e2e8f0; font-size: 16px; }
.searchBox button { padding: 12px 20px; background: linear-gradient(135deg, #6366f1, #8b5cf6); border: none; color: #fff; cursor: pointer; }
.searchBox h2 { font-size: 0.9rem; color: #64748b; margin-bottom: 12px; }

/* Footer */
footer { margin-top: 48px; padding: 32px 0; border-top: 1px solid rgba(99,102,241,0.2); }
footer .abot { margin-bottom: 24px; }
footer .abot p { color: #64748b; line-height: 1.6; margin-bottom: 8px; font-size: 14px; }
footer .bot { padding-top: 24px; border-top: 1px solid rgba(99,102,241,0.15); }
footer .bot nav { display: flex; gap: 24px; margin-bottom: 16px; }
footer .bot nav a { color: #818cf8; text-decoration: none; }
footer .bot nav a:hover { text-decoration: underline; }
footer .bot nav a[aria-current="page"] { color: #c7d2fe; text-decoration: underline; text-underline-offset: 4px; }
footer .copy { color: #94a3b8; font-size: 12px; }

/* Back to top */
.top_lea { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; background: linear-gradient(135deg, #6366f1, #8b5cf6); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 15px rgba(99,102,241,0.4); }
.top_lea:hover { box-shadow: 0 6px 20px rgba(99,102,241,0.5); }

/* Informational and policy pages */
.legal-page { width: min(100% - 32px, 820px); margin: 0 auto; padding: 36px 0 64px; }
.legal-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 32px; color: #64748b; font-size: 13px; }
.legal-breadcrumb a { color: #a5b4fc; }
.legal-kicker { margin-bottom: 8px; color: #a5b4fc; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.legal-page h1 { margin-bottom: 10px; color: #f8fafc; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; }
.legal-page .updated { margin-bottom: 24px; color: #94a3b8; font-size: 13px; }
.legal-page .legal-lead { margin-bottom: 30px; color: #cbd5e1; font-size: 1.05rem; line-height: 1.75; }
.legal-page section { padding: 26px 0; border-top: 1px solid rgba(99,102,241,0.18); scroll-margin-top: 92px; }
.legal-page section:first-of-type { border-top: 0; }
.legal-page h2 { margin-bottom: 12px; color: #c7d2fe; font-size: 1.18rem; line-height: 1.35; }
.legal-page p, .legal-page li { color: #b6c2d2; font-size: 15px; line-height: 1.75; }
.legal-page p + p { margin-top: 13px; }
.legal-page ul, .legal-page ol { margin: 12px 0 0 22px; }
.legal-page li + li { margin-top: 8px; }
.legal-page strong { color: #e2e8f0; }
.legal-page a { color: #a5b4fc; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal-page a:hover { color: #c7d2fe; }
.legal-note { margin-top: 28px; padding: 18px 20px; border: 1px solid rgba(99,102,241,0.28); border-left: 4px solid #818cf8; border-radius: 10px; background: rgba(30,27,75,0.46); color: #b6c2d2; font-size: 14px; line-height: 1.7; }
.policy-index { margin: 26px 0 10px; padding: 20px 22px; border: 1px solid rgba(99,102,241,0.22); border-radius: 12px; background: rgba(30,27,75,0.38); }
.policy-index > strong { display: block; margin-bottom: 10px; }
.policy-index ol { columns: 2; column-gap: 36px; margin-top: 0; }
.policy-index li { break-inside: avoid; margin-bottom: 6px; font-size: 14px; }
.contact-box { margin: 26px 0 10px; padding: 24px; border: 1px solid rgba(99,102,241,0.28); border-radius: 14px; background: rgba(30,27,75,0.55); }
.legal-page .contact-box { border-top: 1px solid rgba(99,102,241,0.28); }
.contact-email { display: inline-block; overflow-wrap: anywhere; font-size: clamp(1rem, 4vw, 1.25rem); font-weight: 700; }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.legal-grid section:first-child { border-top: 1px solid rgba(99,102,241,0.18); }

@media (max-width: 640px) {
  header { padding: 10px 0; }
  .legal-header-link { min-width: auto; font-size: 13px; }
  .legal-header-link:last-child { max-width: 80px; }
  .legal-page { padding-top: 26px; }
  .legal-breadcrumb { margin-bottom: 24px; }
  .legal-grid { grid-template-columns: 1fr; gap: 0; }
  .policy-index ol { columns: 1; }
  footer .bot nav { flex-wrap: wrap; gap: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
