/* Electric Black + Gold casino theme (mobile-first) */
:root{
  --bg:#06040a;
  --panel:#0c0a11;
  --panel2:#0a0f1a;
  --text:#f3f4f6;
  --muted:#a3b2c7;
  --line:rgba(255,215,0,.16);

  --gold:#ffd36b;
  --gold2:#ffb300;
  --electric:#00d1ff;

  --danger:#ef4444;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans TC", Arial;
  line-height:1.55;
  background:
    radial-gradient(1200px 700px at 18% 10%, rgba(255, 200, 0, .10), transparent 55%),
    radial-gradient(900px 600px at 86% 18%, rgba(255, 122, 0, .08), transparent 55%),
    radial-gradient(800px 560px at 50% 110%, rgba(0, 209, 255, .10), transparent 55%),
    linear-gradient(180deg, #07060b, #070910 55%, #06040a);
}

a{color:#93c5fd;text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:980px;margin:0 auto;padding:18px 14px}

.topbar{
  position:sticky;top:0;z-index:30;
  backdrop-filter: blur(10px);
  background: rgba(6,4,10,.66);
  border-bottom:1px solid rgba(255,215,0,.14);
}
.topbar .inner{
  max-width:980px;margin:0 auto;padding:14px 14px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.brand{display:flex;align-items:center;gap:10px;font-weight:950;letter-spacing:.3px}
.brand .dot{
  width:10px;height:10px;border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #ffe8a3, var(--gold) 55%, rgba(255,215,0,.12));
  box-shadow: 0 0 18px rgba(255,215,0,.32), 0 0 30px rgba(0,209,255,.12);
}
.badge{font-size:12px;color:rgba(241,245,249,.78);border:1px solid rgba(255,215,0,.16);padding:4px 10px;border-radius:999px;background: rgba(0,0,0,.18)}

.hamburger{
  width: 42px; height: 36px; border-radius: 12px;
  border: 1px solid rgba(255,215,0,.14);
  background: rgba(255,255,255,.06);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.hamburger:hover{background: rgba(255,255,255,.10)}
.hamburger span{display:block; width:18px; height:2px; background: rgba(241,245,249,.92); position:relative}
.hamburger span:before,.hamburger span:after{content:""; position:absolute; left:0; width:18px; height:2px; background: rgba(241,245,249,.92)}
.hamburger span:before{top:-6px}
.hamburger span:after{top:6px}

.overlay{position: fixed; inset:0; background: rgba(0,0,0,.45); opacity:0; pointer-events:none; transition: .15s; z-index: 60}
.overlay.open{opacity:1; pointer-events:auto}
.drawer{
  position: fixed; top:0; right:0; height:100%; width: 320px; max-width: 86vw;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-left: 1px solid rgba(255,215,0,.14);
  transform: translateX(100%); transition: .18s;
  z-index: 70;
  padding: 14px;
  backdrop-filter: blur(12px);
}
.drawer.open{transform: translateX(0)}
.drawer h3{margin: 6px 0 10px}
.drawer .close{
  border: 1px solid rgba(255,215,0,.14);
  background: rgba(0,0,0,.22);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  color: rgba(241,245,249,.9);
}
.menu{display:flex; flex-direction:column; gap:8px; margin-top:12px}
.menu a{
  border: 1px solid rgba(255,215,0,.12);
  border-radius: 14px;
  padding: 11px 12px;
  text-decoration:none;
  color: rgba(241,245,249,.92);
  background: rgba(0,0,0,.18);
}
.menu a:hover{background: rgba(255,255,255,.06)}
.menu .danger{border-color: rgba(239,68,68,.28); background: rgba(239,68,68,.10); color:#fecaca}
.divider{height:1px; background: rgba(255,215,0,.12); margin: 12px 0}

.grid{display:grid;gap:14px}
@media(min-width:860px){.grid-2{grid-template-columns:1.2fr .8fr}}

.card{
  background:
    radial-gradient(900px 480px at 20% 0%, rgba(255, 215, 0, .10), transparent 60%),
    radial-gradient(860px 480px at 90% 10%, rgba(0, 209, 255, .08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid rgba(255,215,0,.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
  position:relative;
  overflow:hidden;
}
.card:before{
  content:"";
  position:absolute; inset:-2px;
  background:
    linear-gradient(90deg, transparent, rgba(255,215,0,.18), transparent),
    linear-gradient(180deg, transparent, rgba(0,209,255,.14), transparent);
  opacity:.55;
  filter: blur(10px);
  pointer-events:none;
}
.card > *{position:relative; z-index:1}
.card h2,.card h3{margin:0 0 10px}
.muted{color:var(--muted)}
.hr{height:1px;background:var(--line);margin:14px 0}

.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

.pill{
  display:inline-flex;align-items:center;gap:6px;
  font-size:12px;color:var(--muted);
  border:1px solid var(--line);
  padding:6px 10px;border-radius:999px;
}
.pill.ok{border-color: rgba(255,215,0,.28); color: rgba(255,215,0,.92)}
.pill.bad{border-color: rgba(239,68,68,.35); color:#fecaca}

label{display:block;font-size:13px;color:var(--muted);margin:10px 0 6px}
input,select,textarea{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(11,18,34,.68);
  color: var(--text);
  outline:none;
}
input:focus,select:focus,textarea:focus{
  border-color: rgba(255,215,0,.35);
  box-shadow: 0 0 0 4px rgba(255,215,0,.10);
}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 14px;border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  font-weight:800;
}
.btn:hover{background: rgba(255,255,255,.10)}
.btn-primary{
  background: linear-gradient(180deg, rgba(255,215,0,.95), rgba(255,165,0,.92));
  border-color: rgba(255,215,0,.42);
  color:#120a00;
  box-shadow: 0 12px 36px rgba(0,0,0,.55), 0 0 22px rgba(255,215,0,.22);
}
.btn-primary:hover{filter:brightness(1.03)}
.btn-blue{
  background: linear-gradient(180deg, rgba(0,209,255,.92), rgba(56,189,248,.90));
  border-color: rgba(0,209,255,.35);
  color:#04131a;
  box-shadow: 0 12px 36px rgba(0,0,0,.50), 0 0 22px rgba(0,209,255,.18);
}
.btn-danger{background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); color:#fecaca}

/* aliases used on some pages */
.btn-gold{display:inline-flex;align-items:center;justify-content:center;padding:12px 14px;border-radius:14px;border:1px solid rgba(255,215,0,.40);background: linear-gradient(180deg, rgba(255,215,0,.95), rgba(255,165,0,.92));color:#120a00;font-weight:950;text-decoration:none;box-shadow: 0 12px 36px rgba(0,0,0,.55), 0 0 22px rgba(255,215,0,.25)}
.btn-gold:active{transform: translateY(1px)}
.btn-ghost{display:inline-flex;align-items:center;justify-content:center;padding:12px 14px;border-radius:14px;border:1px solid rgba(241,245,249,.18);background: rgba(255,255,255,.06);color:#f3f4f6;font-weight:900;text-decoration:none;box-shadow: 0 12px 36px rgba(0,0,0,.45)}
.btn-ghost:active{transform: translateY(1px)}

.notice{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  margin:10px 0;
}
.notice.ok{border-color: rgba(255,215,0,.28); background: rgba(255,215,0,.10); color: rgba(255,215,0,.92)}
.notice.bad{border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08)}

.table{width:100%;border-collapse:collapse;overflow:hidden;border-radius:14px}
.table th,.table td{padding:10px;border-bottom:1px solid var(--line);text-align:left}
.table th{font-size:12px;color:var(--muted);font-weight:900}
.table tr:hover td{background: rgba(255,255,255,.03)}

/* Mobile friendly tables */
.table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.table-wrap .table{min-width:640px}

/* Toast */
.toast{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);max-width:92vw;
  padding:10px 14px;border-radius:14px;font-weight:800;letter-spacing:.2px;
  opacity:0;pointer-events:none;z-index:9999;filter:drop-shadow(0 8px 18px rgba(0,0,0,.35));
  border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.75);backdrop-filter: blur(10px);
  transition:opacity .18s ease, transform .18s ease}
.toast.show{opacity:1;transform:translateX(-50%) translateY(-2px)}
.toast.ok{color:#fbbf24}
.toast.bad{color:#fb7185}

/* Confirm modal */
.ui-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:9998;
  background:rgba(0,0,0,.55);backdrop-filter: blur(6px)}
.ui-modal.open{display:flex}
.ui-modal-card{width:min(520px,92vw);border-radius:18px;padding:16px 14px;
  border:1px solid rgba(255,255,255,.12);background:rgba(10,10,10,.92);
  box-shadow:0 18px 45px rgba(0,0,0,.55)}
.ui-modal-msg{font-size:14px;line-height:1.5;color:var(--text);padding:6px 6px 12px;word-break:break-word}
.ui-modal-actions{display:flex;gap:10px;justify-content:flex-end;padding:0 6px 6px}

@media (max-width: 520px){
  .ui-modal-actions{justify-content:space-between}
  .ui-modal-actions .btn{flex:1}
}

/* =============================
   EP 熱門動態（全站共用）
   ============================= */
.ep-ticker{margin:10px auto 0;max-width:980px;padding:10px 12px;border-radius:14px;
  border:1px solid rgba(255,215,0,.14);
  background:linear-gradient(180deg, rgba(255,215,0,.06), rgba(0,0,0,.35));
  box-shadow:0 14px 40px rgba(0,0,0,.35);
}
.ep-ticker.dense{margin-top:8px;padding:8px 10px;border-radius:12px}
.ep-ticker .row{display:flex;align-items:center;gap:10px}
.ep-ticker .label{flex:0 0 auto;color:#fbbf24;font-weight:800;letter-spacing:.4px}
.ep-ticker .viewport{overflow:hidden;flex:1}
.ep-ticker .ep-marquee{display:inline-flex;gap:28px;white-space:nowrap;align-items:center;
  animation:ep-marquee 24s linear infinite}
.ep-ticker.dense .ep-marquee{animation-duration: 22s}
.ep-ticker .ep-marquee span{color:rgba(226,232,240,.92);font-size:13px}
.ep-ticker:hover .ep-marquee{animation-play-state: paused}

@keyframes ep-marquee{
  from{transform:translateX(0)}
  to{transform:translateX(-50%)}
}