/* ===== RESET & BASE ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Segoe UI','PingFang SC',system-ui,-apple-system,sans-serif;
  background:#0a0a14;color:#e0e0e0;min-height:100vh;overflow-x:hidden;
}

/* ===== HOMEPAGE: Header ===== */
.header{position:sticky;top:0;z-index:1000;background:rgba(10,10,20,0.92);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:1px solid rgba(255,255,255,0.06);padding:0 20px}
.header-inner{max-width:1400px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;height:60px;gap:16px}
.logo{display:flex;align-items:center;gap:10px;font-size:24px;font-weight:800;color:#fff;text-decoration:none;white-space:nowrap;letter-spacing:-0.5px}
.logo-icon{width:38px;height:38px;background:linear-gradient(135deg,#6c5ce7,#a855f7);border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:20px}
.search-wrap{flex:1;max-width:420px;position:relative}
.search-wrap input{width:100%;padding:10px 16px 10px 42px;border-radius:24px;border:1px solid rgba(255,255,255,0.1);background:rgba(255,255,255,0.05);color:#fff;font-size:15px;outline:none;transition:all 0.3s}
.search-wrap input:focus{border-color:#6c5ce7;background:rgba(255,255,255,0.08);box-shadow:0 0 0 3px rgba(108,92,231,0.15)}
.search-wrap input::placeholder{color:rgba(255,255,255,0.35)}
.search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:rgba(255,255,255,0.35);font-size:18px;pointer-events:none}
.game-count{color:rgba(255,255,255,0.4);font-size:13px;white-space:nowrap}

/* ===== HOMEPAGE: Hero ===== */
.hero{padding:50px 20px 30px;text-align:center;background:radial-gradient(ellipse 800px 400px at 50% 0%,rgba(108,92,231,0.12),transparent)}
.hero h1{font-size:clamp(28px,5vw,48px);font-weight:900;color:#fff;letter-spacing:-1px;margin-bottom:8px}
.hero h1 span{background:linear-gradient(135deg,#6c5ce7,#a855f7,#6c5ce7);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.hero p{color:rgba(255,255,255,0.5);font-size:16px;max-width:500px;margin:0 auto 20px}

/* ===== HOMEPAGE: Category Bar ===== */
.cat-bar{position:sticky;top:60px;z-index:999;background:rgba(10,10,20,0.9);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid rgba(255,255,255,0.05);padding:12px 20px}
.cat-inner{max-width:1400px;margin:0 auto;display:flex;gap:8px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}
.cat-inner::-webkit-scrollbar{display:none}
.cat-pill{padding:7px 18px;border-radius:20px;border:1px solid rgba(255,255,255,0.12);background:rgba(255,255,255,0.03);color:rgba(255,255,255,0.6);font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all 0.25s;user-select:none;-webkit-tap-highlight-color:transparent}
.cat-pill:hover{background:rgba(255,255,255,0.08);color:#fff}
.cat-pill.active{background:linear-gradient(135deg,#6c5ce7,#a855f7);border-color:transparent;color:#fff;box-shadow:0 4px 15px rgba(108,92,231,0.35)}
.cat-count{opacity:0.55;margin-left:4px;font-size:11px}

/* ===== HOMEPAGE: Game Grid ===== */
.main-content{max-width:1400px;margin:0 auto;padding:20px}
.game-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}
.no-results{text-align:center;padding:80px 20px;color:rgba(255,255,255,0.35);grid-column:1/-1}
.no-results .icon{font-size:64px;margin-bottom:16px}
.no-results p{font-size:16px}
.game-card{position:relative;border-radius:16px;background:#14142a;border:1px solid rgba(255,255,255,0.05);overflow:hidden;cursor:pointer;transition:all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;text-decoration:none}
.game-card:hover{transform:translateY(-6px);border-color:rgba(108,92,231,0.4);box-shadow:0 20px 50px rgba(108,92,231,0.2),0 0 0 1px rgba(108,92,231,0.15)}
.game-card:active{transform:scale(0.97)}
.card-img-wrap{position:relative;width:100%;aspect-ratio:1/1;overflow:hidden;background:#1a1a35}
.card-img-wrap img{width:100%;height:100%;object-fit:cover;transition:transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94)}
.game-card:hover .card-img-wrap img{transform:scale(1.08)}
.card-img-wrap .play-overlay{position:absolute;inset:0;background:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity 0.3s}
.game-card:hover .play-overlay{opacity:1}
.play-btn{width:50px;height:50px;background:linear-gradient(135deg,#6c5ce7,#a855f7);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;color:#fff;box-shadow:0 8px 25px rgba(108,92,231,0.5);transition:transform 0.3s}
.game-card:hover .play-btn{transform:scale(1.1)}
.card-info{padding:12px;flex:1;display:flex;flex-direction:column;gap:6px}
.card-title{font-size:14px;font-weight:600;color:#fff;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card-tags{display:flex;gap:4px;flex-wrap:wrap}
.card-tag{font-size:10px;padding:2px 8px;border-radius:10px;background:rgba(108,92,231,0.15);color:rgba(162,138,255,0.9);white-space:nowrap}

/* ===== HOMEPAGE: Featured Section ===== */
.featured-section{max-width:1400px;margin:0 auto;padding:0 20px 20px}
.featured-scroll{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(260px,300px);gap:16px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}
.featured-scroll::-webkit-scrollbar{display:none}
.featured-card{position:relative;border-radius:20px;overflow:hidden;aspect-ratio:16/10;scroll-snap-align:start;cursor:pointer;text-decoration:none;background:#14142a}
.featured-card img{width:100%;height:100%;object-fit:cover;transition:transform 0.5s}
.featured-card:hover img{transform:scale(1.06)}
.featured-info{position:absolute;bottom:0;left:0;right:0;padding:30px 16px 16px;background:linear-gradient(transparent,rgba(0,0,0,0.85))}
.featured-info .title{font-size:17px;font-weight:700;color:#fff;margin-bottom:4px}
.featured-info .tags{display:flex;gap:4px;flex-wrap:wrap}
.featured-info .tags span{font-size:10px;padding:2px 8px;border-radius:10px;background:rgba(255,255,255,0.15);color:rgba(255,255,255,0.85)}
.featured-badge{position:absolute;top:12px;left:12px;padding:4px 12px;border-radius:12px;font-size:11px;font-weight:700;background:linear-gradient(135deg,#f97316,#ef4444);color:#fff}

/* ===== HOMEPAGE: Back to top & Footer ===== */
.back-top{position:fixed;bottom:30px;right:30px;z-index:500;width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#6c5ce7,#a855f7);color:#fff;border:none;cursor:pointer;font-size:20px;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 25px rgba(108,92,231,0.4);opacity:0;transform:translateY(20px);transition:all 0.3s;pointer-events:none}
.back-top.show{opacity:1;transform:translateY(0);pointer-events:auto}
.back-top:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgba(108,92,231,0.5)}
.footer{text-align:center;padding:40px 20px;color:rgba(255,255,255,0.25);font-size:13px;border-top:1px solid rgba(255,255,255,0.04);margin-top:40px}
.footer a{color:rgba(255,255,255,0.25);text-decoration:none;margin:0 6px}
.footer a:hover{color:rgba(255,255,255,0.55)}

/* ===== DETAIL PAGES: Header ===== */
.detail-header{
  position:sticky;top:0;z-index:100;
  background:rgba(10,10,20,0.92);backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(255,255,255,0.06);padding:0 20px;
}
.detail-header-inner{
  max-width:1200px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;height:56px;gap:16px;
}
.back-link{
  display:flex;align-items:center;gap:6px;
  color:rgba(255,255,255,0.6);text-decoration:none;font-size:14px;font-weight:500;
  transition:color 0.2s;
}
.back-link:hover{color:#fff}
.back-arrow{font-size:18px}
.logo-small{
  font-size:20px;font-weight:800;color:#fff;text-decoration:none;
  white-space:nowrap;letter-spacing:-0.5px;
  display:flex;align-items:center;gap:8px;
}
.logo-small-icon{
  width:30px;height:30px;
  background:linear-gradient(135deg,#6c5ce7,#a855f7);
  border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:15px;
}

/* ===== DETAIL PAGES: Hero Image ===== */
.detail-hero{max-width:1200px;margin:0 auto;padding:24px 20px 0}
.hero-img-wrap{
  position:relative;width:100%;border-radius:20px;overflow:hidden;
  background:#1a1a35;aspect-ratio:16/9;max-height:500px;
}
.hero-img-wrap img{width:100%;height:100%;object-fit:cover}

/* ===== DETAIL PAGES: Info Section ===== */
.detail-info{max-width:800px;margin:0 auto;padding:24px 20px 40px}
.game-title{
  font-size:clamp(24px,4vw,36px);font-weight:900;color:#fff;
  margin-bottom:12px;letter-spacing:-0.5px;
}
.game-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}
.game-meta .tag{
  padding:6px 16px;border-radius:20px;font-size:13px;font-weight:500;
  background:rgba(108,92,231,0.15);color:rgba(162,138,255,0.9);
  text-decoration:none;transition:background 0.2s;
}
.game-meta .tag:hover{background:rgba(108,92,231,0.3)}

/* Description */
.desc-section{margin-bottom:32px}
.desc-section h2{font-size:20px;font-weight:700;color:#fff;margin-bottom:12px}
.desc-section p{font-size:15px;line-height:1.7;color:rgba(255,255,255,0.6)}

/* Play Button */
.play-section{text-align:center;margin-bottom:40px}
.play-now-btn{
  display:inline-flex;align-items:center;gap:10px;
  padding:16px 48px;border-radius:50px;
  background:linear-gradient(135deg,#6c5ce7,#a855f7);
  color:#fff;font-size:18px;font-weight:700;text-decoration:none;
  box-shadow:0 8px 35px rgba(108,92,231,0.4);
  transition:all 0.3s;border:none;cursor:pointer;
}
.play-now-btn:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 45px rgba(108,92,231,0.55);
}
.play-now-btn:active{transform:scale(0.96)}

/* ===== DETAIL PAGES: Game Player ===== */
.game-player-wrap{display:none;max-width:1200px;margin:0 auto;padding:24px 20px}
.game-player-wrap.active{display:block}
.game-player-inner{
  position:relative;width:100%;border-radius:20px;overflow:hidden;
  background:#000;box-shadow:0 8px 40px rgba(0,0,0,0.5);
}
.game-player-inner iframe{
  display:block;width:100%;height:70vh;min-height:450px;border:none;
}
.player-controls{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 16px;
  background:rgba(10,10,20,0.95);
  border-top:1px solid rgba(255,255,255,0.08);
}
.player-title{font-size:14px;font-weight:600;color:#fff;display:flex;align-items:center;gap:8px}
.player-title .dot{
  width:8px;height:8px;border-radius:50%;
  background:#22c55e;animation:pulse-dot 1.5s infinite;
}
@keyframes pulse-dot{0%,100%{opacity:1}50%{opacity:0.4}}
.close-game-btn{
  padding:8px 20px;border-radius:20px;
  border:1px solid rgba(255,255,255,0.2);
  background:rgba(255,255,255,0.06);color:#fff;
  font-size:13px;font-weight:500;cursor:pointer;
  transition:all 0.2s;display:flex;align-items:center;gap:6px;
}
.close-game-btn:hover{background:rgba(239,68,68,0.2);border-color:#ef4444}
.hero-hide{display:none !important}

/* ===== DETAIL PAGES: Related Games ===== */
.related-section{max-width:1200px;margin:0 auto;padding:0 20px 40px}
.related-section h2{font-size:22px;font-weight:700;color:#fff;margin-bottom:16px;padding-left:4px}
.related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.related-card{
  display:block;border-radius:14px;background:#14142a;
  border:1px solid rgba(255,255,255,0.05);overflow:hidden;
  text-decoration:none;transition:all 0.3s;
}
.related-card:hover{
  transform:translateY(-4px);
  border-color:rgba(108,92,231,0.35);
  box-shadow:0 12px 35px rgba(108,92,231,0.15);
}
.related-card .img-wrap{width:100%;aspect-ratio:1/1;overflow:hidden;background:#1a1a35}
.related-card .img-wrap img{width:100%;height:100%;object-fit:cover;transition:transform 0.4s}
.related-card:hover .img-wrap img{transform:scale(1.06)}
.related-card .info{padding:10px}
.related-card .title{
  font-size:13px;font-weight:600;color:#fff;line-height:1.3;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}

/* ===== DETAIL PAGES: Footer ===== */
.detail-footer{
  text-align:center;padding:30px 20px;color:rgba(255,255,255,0.2);font-size:12px;
  border-top:1px solid rgba(255,255,255,0.04);
}
.detail-footer a{color:rgba(255,255,255,0.3);text-decoration:none;margin:0 6px}
.detail-footer a:hover{color:rgba(255,255,255,0.6)}

/* ===== STATIC PAGES: Privacy, Contact ===== */
.static-content{max-width:800px;margin:0 auto;padding:40px 20px 60px}
.static-content h1{font-size:clamp(26px,4vw,38px);font-weight:900;color:#fff;margin-bottom:8px}
.static-content .updated{color:rgba(255,255,255,0.35);font-size:13px;margin-bottom:32px}
.static-content .subtitle{color:rgba(255,255,255,0.45);font-size:15px;margin-bottom:36px}
.static-content h2{font-size:20px;font-weight:700;color:#fff;margin:32px 0 12px;padding-top:8px}
.static-content p{color:rgba(255,255,255,0.6);font-size:15px;margin-bottom:14px}
.static-content ul{color:rgba(255,255,255,0.6);font-size:15px;margin:8px 0 14px 24px}
.static-content ul li{margin-bottom:6px}
.static-content a{color:#a78bfa;text-decoration:underline;text-underline-offset:2px}
.static-content a:hover{color:#c4b5fd}

/* Contact Cards */
.contact-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:40px}
.contact-card{
  background:#14142a;border:1px solid rgba(255,255,255,0.05);
  border-radius:16px;padding:24px;text-align:center;transition:border-color 0.3s;
}
.contact-card:hover{border-color:rgba(108,92,231,0.3)}
.contact-card .card-icon{font-size:36px;margin-bottom:12px}
.contact-card h3{font-size:16px;font-weight:700;color:#fff;margin-bottom:6px}
.contact-card p{color:rgba(255,255,255,0.5);font-size:14px;word-break:break-all}
.contact-card a{color:#a78bfa;text-decoration:none}
.contact-card a:hover{text-decoration:underline}

/* Contact Form */
.form-section{margin-bottom:40px}
.form-section h2{font-size:22px;font-weight:700;color:#fff;margin-bottom:16px}
.form-card{
  background:#14142a;border:1px solid rgba(255,255,255,0.05);
  border-radius:16px;padding:28px;
}
.form-row{margin-bottom:16px}
.form-row label{display:block;font-size:14px;font-weight:600;color:rgba(255,255,255,0.8);margin-bottom:6px}
.form-row input,.form-row textarea{
  width:100%;padding:12px 16px;border-radius:12px;
  border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.04);color:#fff;
  font-size:15px;font-family:inherit;outline:none;transition:border-color 0.3s;
}
.form-row input:focus,.form-row textarea:focus{
  border-color:#6c5ce7;
  box-shadow:0 0 0 3px rgba(108,92,231,0.1);
}
.form-row textarea{resize:vertical;min-height:120px}
.submit-btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:14px 40px;border-radius:50px;
  background:linear-gradient(135deg,#6c5ce7,#a855f7);
  color:#fff;font-size:16px;font-weight:700;border:none;cursor:pointer;
  box-shadow:0 8px 30px rgba(108,92,231,0.35);
  transition:all 0.3s;
}
.submit-btn:hover{transform:translateY(-2px);box-shadow:0 12px 40px rgba(108,92,231,0.5)}
.submit-btn:active{transform:scale(0.97)}

/* ===== STATIC PAGES: FAQ ===== */
.faq-section{margin-bottom:40px}
.faq-section h2{font-size:22px;font-weight:700;color:#fff;margin-bottom:16px}
.faq-item{
  background:#14142a;border:1px solid rgba(255,255,255,0.05);
  border-radius:14px;padding:20px 24px;margin-bottom:10px;
  cursor:pointer;transition:border-color 0.3s;
}
.faq-item:hover{border-color:rgba(108,92,231,0.25)}
.faq-item h4{font-size:15px;font-weight:600;color:#fff;margin-bottom:6px;display:flex;align-items:center;gap:8px}
.faq-item h4 .q{color:#6c5ce7;font-weight:800;font-size:16px}
.faq-item p{color:rgba(255,255,255,0.5);font-size:14px}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
  /* Homepage */
  .header-inner{height:52px;gap:10px}.logo{font-size:20px}.logo-icon{width:32px;height:32px;font-size:16px}
  .search-wrap{max-width:200px}.search-wrap input{padding:8px 12px 8px 34px;font-size:14px}
  .game-count{display:none}.hero{padding:32px 16px 20px}
  .hero h1{font-size:26px}.hero p{font-size:14px}
  .cat-bar{top:52px;padding:10px 16px}.cat-pill{padding:6px 14px;font-size:12px}
  .main-content{padding:12px}.game-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
  .card-info{padding:10px}.card-title{font-size:13px}.card-tag{font-size:9px;padding:2px 6px}
  .back-top{bottom:20px;right:20px;width:40px;height:40px;font-size:16px}
  .featured-section{padding:0 12px 16px}.featured-scroll{grid-auto-columns:minmax(200px,240px);gap:10px}
  .featured-info .title{font-size:14px}
  /* Detail pages */
  .detail-header-inner{height:48px}
  .logo-small{font-size:17px}.logo-small-icon{width:26px;height:26px;font-size:13px}
  .back-link{font-size:13px}
  .detail-hero{padding:16px 12px 0}
  .hero-img-wrap{border-radius:14px;max-height:300px}
  .detail-info{padding:16px 12px 32px}
  .game-title{font-size:22px}
  .play-now-btn{padding:14px 36px;font-size:16px}
  .related-section{padding:0 12px 32px}
  .related-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
  .related-card .title{font-size:12px}.related-card .info{padding:8px}
  .game-player-wrap{padding:12px 12px}
  .game-player-inner{border-radius:14px}
  .game-player-inner iframe{height:55vh;min-height:350px}
  .player-controls{padding:8px 12px}
  .player-title{font-size:12px}.close-game-btn{padding:6px 14px;font-size:12px}
  .static-content{padding:24px 16px 40px}
  .static-content h1{font-size:24px}.static-content h2{font-size:18px}
  .contact-cards{grid-template-columns:1fr}
  .form-card{padding:20px}
  .submit-btn{width:100%;justify-content:center}
}
@media(max-width:400px){
  .game-grid{grid-template-columns:repeat(2,1fr);gap:8px}
  .search-wrap{max-width:140px}.logo{font-size:17px}
  .related-grid{grid-template-columns:repeat(2,1fr)}
  .game-player-inner iframe{height:50vh;min-height:280px}
}
