/* ==========================================================
   Megajudi303 — Casino Theme Stylesheet
   Struktur ala WordPress theme: wp-content/themes/megajudi303
   ========================================================== */
:root {
  --black: #0d0d14;
  --black-2: #14141f;
  --black-3: #1c1c2b;
  --red: #d62828;
  --red-dark: #a31f1f;
  --gold: #f5c518;
  --gold-soft: #ffd94d;
  --green: #1f9d55;
  --blue: #1e6fd9;
  --white: #ffffff;
  --gray: #b8b8c7;
  --gray-2: #8a8a9c;
  --border: #2a2a3d;
  --radius: 14px;
  --shadow-gold: 0 4px 24px rgba(245, 197, 24, .18);
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.75;
  overflow-x: hidden;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部公告跑马灯 ---------- */
.top-marquee {
  background: linear-gradient(90deg, var(--red-dark), var(--red), var(--red-dark));
  color: #fff; font-size: 13px; padding: 7px 0; overflow: hidden; white-space: nowrap;
  position: relative; max-width: 100vw;
}
.top-marquee .marquee-inner { display: inline-block; padding-left: 100%; animation: marquee 30s linear infinite; will-change: transform; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(13, 13, 20, .96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: .5px; color: var(--white); }
.brand-name span { color: var(--gold); }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--gray); font-size: 14px; font-weight: 600; padding: 8px 11px;
  border-radius: 8px; transition: .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--gold); background: rgba(245, 197, 24, .08); }
.header-cta { display: flex; gap: 8px; flex-shrink: 0; }
.btn {
  display: inline-block; font-weight: 700; font-size: 14px; padding: 10px 20px;
  border-radius: 10px; border: none; cursor: pointer; transition: .2s; text-align: center;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #e0a800); color: #1a1a1a;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { transform: translateY(-2px); color: #000; box-shadow: 0 6px 28px rgba(245, 197, 24, .35); }
.btn-red { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; }
.btn-red:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 6px 24px rgba(214, 40, 40, .4); }
.btn-outline { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: rgba(245, 197, 24, .1); color: var(--gold-soft); }
.btn-green { background: linear-gradient(135deg, var(--green), #157a3e); color: #fff; }
.btn-green:hover { transform: translateY(-2px); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--gold); font-size: 22px; padding: 4px 12px; border-radius: 8px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 480px; display: flex; align-items: center;
  background: url("../img/hero-main.webp") center/cover no-repeat;
  border-bottom: 2px solid rgba(245, 197, 24, .25);
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,13,20,.55), rgba(13,13,20,.88)); }
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 72px 16px; width: 100%; }
.hero-badge {
  display: inline-block; background: rgba(214, 40, 40, .2); border: 1px solid var(--red);
  color: #ffb3b3; font-size: 13px; font-weight: 700; padding: 6px 16px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 900; line-height: 1.2; margin-bottom: 16px; text-shadow: 0 4px 30px rgba(0,0,0,.7); }
.hero h1 .gold { color: var(--gold); }
.hero p.lead { font-size: clamp(15px, 2vw, 19px); color: var(--gray); max-width: 760px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn { font-size: 16px; padding: 14px 34px; }
.hero-stats { display: flex; justify-content: center; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat b { display: block; font-size: 26px; color: var(--gold); font-weight: 900; }
.hero-stat span { font-size: 13px; color: var(--gray); }

/* ---------- 通用板块 ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--black-2); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title .kicker { color: var(--red); font-weight: 800; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.section-title h2 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; margin: 6px 0 10px; }
.section-title h2 .gold { color: var(--gold); }
.section-title p { color: var(--gray); max-width: 680px; margin: 0 auto; font-size: 15px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--black-3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; transition: .25s;
}
.card:hover { border-color: rgba(245, 197, 24, .5); transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px; background: rgba(245, 197, 24, .12); border: 1px solid rgba(245, 197, 24, .3);
}
.card h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.card p { color: var(--gray); font-size: 14px; }

/* ---------- 支付图标网格 ---------- */
.pay-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.pay-item {
  background: var(--black-3); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 10px; text-align: center; transition: .2s;
}
.pay-item:hover { border-color: var(--gold); }
.pay-item .pay-logo { font-size: 22px; font-weight: 900; letter-spacing: .5px; }
.pay-item small { display: block; color: var(--gray-2); font-size: 11px; margin-top: 4px; }
.pay-cat { color: var(--gray); font-size: 13px; font-weight: 700; margin: 26px 0 12px; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- 比较表格 ---------- */
.compare-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.compare { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--black-3); }
table.compare th, table.compare td { padding: 14px 18px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
table.compare thead th { background: linear-gradient(135deg, rgba(245,197,24,.15), rgba(214,40,40,.12)); font-weight: 800; }
table.compare td.yes { color: var(--green); font-weight: 700; }
table.compare td.no { color: var(--red); font-weight: 700; }
table.compare tr:last-child td { border-bottom: none; }

/* ---------- 步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: var(--black-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 24px 24px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; left: 24px; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #e0a800); color: #1a1a1a;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px;
  box-shadow: var(--shadow-gold);
}
.step h3 { font-size: 17px; font-weight: 800; margin: 8px 0 8px; }
.step p { color: var(--gray); font-size: 14px; }

/* ---------- 促销卡 ---------- */
.promo-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.promo-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.promo-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.promo-tag { align-self: flex-start; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; text-transform: uppercase; }
.promo-body h3 { font-size: 17px; margin-bottom: 8px; }
.promo-body p { color: var(--gray); font-size: 13.5px; flex: 1; }
.promo-body .btn { margin-top: 14px; align-self: flex-start; }

/* ---------- 游戏大厅 ---------- */
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.game-item {
  background: var(--black-3); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 14px; text-align: center; transition: .2s; position: relative; overflow: hidden;
}
.game-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(245,197,24,.08), transparent 60%); opacity: 0; transition: .2s;
}
.game-item:hover { border-color: var(--gold); transform: translateY(-3px); }
.game-item:hover::after { opacity: 1; }
.game-item .g-icon { font-size: 34px; margin-bottom: 10px; }
.game-item b { display: block; font-size: 14.5px; }
.game-item small { color: var(--gray-2); font-size: 12px; }
.provider-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.provider-strip span {
  background: var(--black-3); border: 1px solid var(--border); color: var(--gray);
  font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 999px;
}

/* ---------- 文章排版 ---------- */
.article-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; border: 1px solid var(--border); }
.article-hero img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.article-body { max-width: 820px; margin: 0 auto; }
.article-body h2 { font-size: 26px; font-weight: 900; margin: 40px 0 14px; color: var(--gold); }
.article-body h3 { font-size: 20px; font-weight: 800; margin: 30px 0 10px; }
.article-body p { color: #d5d5e0; margin-bottom: 16px; font-size: 15.5px; }
.article-body ul, .article-body ol { color: #d5d5e0; margin: 0 0 16px 22px; font-size: 15.5px; }
.article-body li { margin-bottom: 8px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 14px; display: block; overflow-x: auto; }
.article-body table thead { background: rgba(245, 197, 24, .1); }
.article-body th, .article-body td { padding: 11px 14px; border: 1px solid var(--border); text-align: left; white-space: nowrap; }
.article-body td { color: #d5d5e0; }
.article-body blockquote {
  border-left: 4px solid var(--gold); background: rgba(245, 197, 24, .06);
  padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 20px 0; color: var(--gold-soft); font-style: italic;
}
.article-meta { color: var(--gray-2); font-size: 13px; margin-bottom: 22px; display: flex; gap: 16px; flex-wrap: wrap; }
.notice-box {
  background: rgba(31, 157, 85, .08); border: 1px solid rgba(31, 157, 85, .4);
  border-radius: 12px; padding: 18px 22px; margin: 24px 0; font-size: 14px; color: #c9ecd8;
}
.warn-box {
  background: rgba(214, 40, 40, .08); border: 1px solid rgba(214, 40, 40, .4);
  border-radius: 12px; padding: 18px 22px; margin: 24px 0; font-size: 14px; color: #f3c6c6;
}

/* ---------- FAQ 手风琴 ---------- */
.faq-item { background: var(--black-3); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; color: var(--white);
  font-size: 15.5px; font-weight: 700; padding: 18px 20px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font);
}
.faq-q::after { content: "+"; color: var(--gold); font-size: 22px; font-weight: 400; flex-shrink: 0; }
.faq-item.open .faq-q::after { content: "−"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 20px 18px; color: var(--gray); font-size: 14.5px; }
.faq-item.open .faq-a { max-height: 500px; }

/* ---------- 标签云 ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tag-cloud a {
  background: var(--black-3); border: 1px solid var(--border); color: var(--gray);
  font-size: 13px; padding: 7px 15px; border-radius: 999px; transition: .2s;
}
.tag-cloud a:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 搜索 ---------- */
.search-bar { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.search-bar input {
  flex: 1; background: var(--black-3); border: 1px solid var(--border); border-radius: 10px;
  color: var(--white); padding: 12px 16px; font-size: 15px; outline: none; min-width: 0;
}
.search-bar input:focus { border-color: var(--gold); }
.search-results { max-width: 560px; margin: 14px auto 0; text-align: left; }
.search-results a {
  display: block; background: var(--black-3); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; color: var(--white); font-size: 14.5px;
}
.search-results a:hover { border-color: var(--gold); }
.search-results a small { display: block; color: var(--gray-2); font-size: 12px; }

/* ---------- 表单（注册/登录） ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-card { background: var(--black-3); border: 1px solid var(--border); border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow-gold); }
.auth-card h1 { font-size: 24px; font-weight: 900; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--gray); font-size: 14px; margin-bottom: 26px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--gray); }
.form-group input, .form-group select {
  width: 100%; background: var(--black-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--white); padding: 12px 14px; font-size: 15px; outline: none; font-family: var(--font);
}
.form-group input:focus, .form-group select:focus { border-color: var(--gold); }
.form-note { font-size: 12.5px; color: var(--gray-2); margin-top: 6px; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--gray); }

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 13px; color: var(--gray-2); padding: 16px 0 0; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { margin: 0 8px; color: var(--gray-2); }
.breadcrumb .current { color: var(--gold); }

/* ---------- 页脚 ---------- */
.site-footer { background: #0a0a10; border-top: 1px solid var(--border); padding: 52px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; }
.footer-grid h4 { font-size: 15px; font-weight: 800; color: var(--gold); margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--gray); font-size: 13.5px; }
.footer-grid a:hover { color: var(--gold); }
.footer-grid p { color: var(--gray-2); font-size: 13px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 40px; padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--gray-2);
}
.age-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 2.5px solid var(--red); border-radius: 50%; color: var(--red); font-weight: 900; font-size: 15px;
}
.footer-badges { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.footer-badges .rg-badge {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 12px; color: var(--gray);
}

/* ---------- 底部浮窗（老虎机风格） ---------- */
.float-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 950;
  display: flex; gap: 12px; padding: 10px 12px; border-radius: 18px;
  background: rgba(20, 20, 31, .92); border: 1px solid rgba(245, 197, 24, .45);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6), 0 0 30px rgba(245, 197, 24, .15);
  backdrop-filter: blur(10px);
}
.slot-btn {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 15px; padding: 13px 26px; border-radius: 12px; letter-spacing: .5px;
  transition: .2s; white-space: nowrap;
}
.slot-btn .coin { font-size: 19px; animation: coinSpin 2.2s linear infinite; display: inline-block; }
@keyframes coinSpin { 0% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
.slot-btn::before {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: shine 2.8s ease-in-out infinite;
}
@keyframes shine { 0% { left: -80%; } 60%, 100% { left: 130%; } }
.slot-btn:hover { transform: translateY(-3px) scale(1.04); }
.slot-daftar { background: linear-gradient(135deg, var(--gold), #e0a800); color: #1a1a1a; box-shadow: 0 4px 20px rgba(245, 197, 24, .45); }
.slot-login { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; box-shadow: 0 4px 20px rgba(214, 40, 40, .45); }
.coin-particle {
  position: fixed; z-index: 960; pointer-events: none; font-size: 22px;
  animation: coinFly 1s ease-out forwards;
}
@keyframes coinFly {
  0% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  100% { opacity: 0; transform: translateY(-140px) scale(1.6) rotate(340deg); }
}

/* ---------- 杂项 ---------- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.cta-band {
  background: linear-gradient(135deg, rgba(214, 40, 40, .18), rgba(245, 197, 24, .12));
  border: 1px solid rgba(245, 197, 24, .35); border-radius: 18px;
  padding: 44px 30px; text-align: center;
}
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; margin-bottom: 10px; }
.cta-band p { color: var(--gray); max-width: 620px; margin: 0 auto 24px; font-size: 15px; }
.page-hero { padding: 48px 0 8px; }
.page-hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; margin-bottom: 10px; }
.page-hero h1 .gold { color: var(--gold); }
.page-hero p { color: var(--gray); max-width: 720px; font-size: 15.5px; }
.toc { background: var(--black-3); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; margin: 24px 0; }
.toc b { color: var(--gold); font-size: 14px; }
.toc ol { margin: 10px 0 0 20px; font-size: 14px; color: var(--gray); }
.toc a { color: var(--gray); }
.toc a:hover { color: var(--gold); }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pay-grid { grid-template-columns: repeat(3, 1fr); }
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .header-cta { order: 3; width: 100%; justify-content: flex-end; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black-2); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; }
  .nav-toggle { display: block; }
  .header-cta .btn { padding: 8px 14px; font-size: 13px; }
  .hero { min-height: 420px; }
  .hero-stats { gap: 22px; }
  .section { padding: 46px 0; }
  .float-bar { width: calc(100% - 24px); justify-content: center; }
  .compare-wrap { -webkit-overflow-scrolling: touch; }
  table.compare { min-width: 520px; }
  .slot-btn { flex: 1; justify-content: center; padding: 13px 10px; font-size: 14px; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .pay-grid { grid-template-columns: repeat(2, 1fr); }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .auth-card { padding: 26px 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
