/* === GamePuso Hybrid Neon-Emerald UI === */
:root {
  --bg: #07120d;
  --bg-gradient: linear-gradient(120deg,#08130f,#031d16,#051428);
  --surface: rgba(16,26,20,0.9);
  --surface-alt: rgba(20,33,24,0.95);
  --border: #1f2a22;
  --muted: #a1b0a8;
  --acc: #16a34a;         /* xanh lục đậm */
  --acc-light: #22c55e;   /* xanh sáng */
  --gold: #fbbf24;        /* vàng cam nhạt */
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --glow-green: #3fff9e;
  --accent: #00f2a6;
  --accent2: #ffb347;
  --shadow: rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

html,body {
  margin:0; padding:0;
  background: var(--bg-gradient);
  color: var(--text);
  font-family:"Inter",system-ui,Arial,sans-serif;
  line-height:1.6;
  overflow-x:hidden;
}

/* === LINKS === */
a {
  color: var(--gold);
  text-decoration:none;
  transition:color .25s, text-shadow .25s;
}
a:hover { color: var(--acc-light); text-shadow:0 0 6px var(--acc-light); }

/* === LAYOUT === */
.container { max-width:1000px; margin:24px auto; padding:0 16px; }

/* === TOPBAR === */
.topbar {
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 20px;
  background:rgba(8,20,16,0.8);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(255,255,255,0.08);
  box-shadow:0 2px 6px var(--shadow);
  position:sticky; top:0; z-index:99;
}
.brand {
  font-weight:700; color:var(--accent);
  font-size:1.3rem;
  letter-spacing:1px;
  text-shadow:0 0 10px var(--accent);
}
.topbar nav a {
  margin-left:16px;
  color:var(--text-dim);
  font-weight:500;
}
.topbar nav a:hover { color:var(--gold); }

/* === CARD === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform .25s, box-shadow .25s, background .25s;
}
.card:hover {
  transform: translateY(-3px);
  background: var(--surface-alt);
  box-shadow: 0 8px 24px rgba(0,255,150,0.15);
}

/* === BUTTONS === */
.btn {
  display:inline-block;
  background:linear-gradient(90deg,#00f2a6,#09f,#00f2a6);
  color:#000;
  padding:10px 16px;
  font-weight:600;
  border:none;
  border-radius:10px;
  cursor:pointer;
  transition:all .3s ease;
  background-size:200%;
  position:relative;
  overflow:hidden;
}
.btn:hover { background-position:right center; transform:scale(1.03); }
.btn:active { transform:scale(1); }
.btn.gold { background:linear-gradient(135deg,#fbbf24,#facc15); color:#171717; }
.btn.red { background:linear-gradient(135deg,#ef4444,#dc2626); color:#fff; }

/* Ripple effect */
.btn .ripple {
  position:absolute;
  border-radius:50%;
  background:rgba(255,255,255,0.3);
  transform:scale(0);
  animation:ripple .6s linear;
  pointer-events:none;
}
@keyframes ripple { to { transform:scale(4); opacity:0; } }

/* === FORM === */
label {
  display:block; margin:8px 0 4px;
  font-weight:500; color:var(--gold); font-size:.95rem;
}
input,select,textarea {
  width:100%; padding:10px 12px;
  border-radius:8px;
  border:1px solid var(--border);
  background:rgba(25,35,30,0.9);
  color:var(--text);
  transition:border-color .2s,box-shadow .2s;
}
input:focus,select:focus,textarea:focus {
  outline:none;
  border-color:var(--acc-light);
  box-shadow:0 0 6px rgba(34,197,94,0.3);
}

/* === TABLE === */
.table {
  width:100%;
  border-collapse:collapse;
  border-radius:10px;
  overflow:hidden;
}
.table th,.table td {
  border:1px solid var(--border);
  padding:10px;
}
.table th {
  background:var(--surface-alt);
  color:var(--gold);
  font-weight:600;
}
.table tr:nth-child(even){background:var(--surface);}
.table tr:hover{background:#13231a;}

/* === FLASH === */
.flash {
  background:rgba(22,163,74,0.08);
  border-left:4px solid var(--acc-light);
  padding:12px 16px;
  border-radius:8px;
  margin:16px 0;
  color:var(--text);
  font-size:.95rem;
}
.flash.error { background:rgba(239,68,68,0.1); border-left-color:var(--err); }
.flash.warn { background:rgba(245,158,11,0.1); border-left-color:var(--warn); }

/* === TABS === */
.tabs { display:flex; border-bottom:1px solid var(--border); margin-bottom:12px; }
.tab {
  padding:12px 20px;
  cursor:pointer;
  color:var(--muted);
  font-weight:500;
  transition:background .2s,color .2s;
}
.tab:hover { background:#0e1b12; color:var(--gold); }
.tab.active {
  background:var(--surface-alt);
  color:var(--gold);
  border-bottom:3px solid var(--gold);
  font-weight:600;
}
.tab-content { display:none; padding:20px 0; animation:fadeIn .3s ease; }
.tab-content.active { display:block; }

/* === HEADINGS === */
h1,h2 { text-shadow:0 0 10px rgba(0,255,170,0.15); }
h2,h3 { color:var(--acc-light); font-weight:600; margin-top:8px; }
strong { color:var(--gold); }

/* === AUTH LAYOUT === */
.auth-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  margin-top:24px;
}
.auth-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(34,197,94,0.08), transparent 70%);
  pointer-events: none;
}
.auth-card:hover {
  transform: translateY(-4px);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(0,255,100,0.15);
}
.auth-card h2 {
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
}
.auth-card p.subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.auth-card form { display:flex; flex-direction:column; gap:10px; }

@media(max-width:800px){ .auth-grid{grid-template-columns:1fr;} }

/* === FOOTER === */
.footer {
  padding:24px;
  text-align:center;
  color:var(--muted);
  font-size:.9rem;
  border-top:1px solid var(--border);
  margin-top:40px;
}

/* === ANIMATION === */
@keyframes fadeIn { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }
body { opacity:0; transition:opacity .4s ease; }
body.page-loaded { opacity:1; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-thumb { background:var(--acc); border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:var(--acc-light); }

/* === GRADIENT BACKGROUND ANIMATION === */
body {
  background: linear-gradient(135deg, #06130d, #0b1c13, #05120a);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}
@keyframes gradientShift {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* === CRYPTO TOASTS (Neon Glass) === */
#toast-box {
  position: fixed;
  top: 16px;          /* đổi thành bottom:16px nếu muốn ở dưới */
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none; /* cho click xuyên container */
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: rgba(20, 33, 24, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 4px solid var(--acc-light);
  color: var(--text);
  padding: 12px 14px 12px 12px;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.45), 0 0 24px rgba(34,197,94,0.15);
  backdrop-filter: blur(8px);
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: start;
  animation: toastIn .28s ease;
  position: relative;
  overflow: hidden;
}

.toast::after { /* glow viền nhẹ */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120px 60px at 10% 0%, rgba(34,197,94,.07), transparent 60%);
  pointer-events: none;
}

.toast .t-icon {
  font-size: 18px; line-height: 28px; width: 28px; text-align: center;
  filter: drop-shadow(0 0 6px rgba(34,197,94,.35));
}
.toast .t-content { font-size: .95rem; line-height: 1.4; }
.toast .t-close {
  background: transparent; border: 0; color: var(--text-dim);
  font-size: 18px; cursor: pointer; padding: 0 2px; margin-left: 6px;
  transition: transform .15s, color .2s;
}
.toast .t-close:hover { transform: scale(1.1); color: var(--gold); }

/* thanh tiến trình tự ẩn */
.toast .t-progress {
  position: absolute; left: 0; bottom: 0; height: 3px;
  width: 100%; background: rgba(255,255,255,0.08);
}
.toast .t-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--acc-light), #61dafb, var(--acc-light));
  background-size: 200% 100%;
  animation: barMove 1.6s linear infinite, barShrink var(--t-dur, 4s) linear forwards;
}

/* biến thể màu */
.toast.info  { border-left-color: #60a5fa; box-shadow: 0 0 20px rgba(96,165,250,.12); }
.toast.warn  { border-left-color: var(--warn); box-shadow: 0 0 20px rgba(245,158,11,.12); }
.toast.error { border-left-color: var(--err);  box-shadow: 0 0 20px rgba(239,68,68,.12); }
.toast.success { border-left-color: var(--ok); box-shadow: 0 0 20px rgba(34,197,94,.12); }

/* hoạt ảnh */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-8px); filter: blur(2px); }
}
@keyframes barMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes barShrink {
  from { width: 100%; }
  to   { width: 0%; }
}
.btn.small {
  background:rgba(255,255,255,0.05);
  color:var(--gold);
  border:1px solid rgba(255,255,255,0.1);
  padding:2px 6px;
  border-radius:6px;
  font-size:0.8rem;
  cursor:pointer;
  transition:0.2s;
}
.btn.small:hover {
  background:var(--acc-light);
  color:#000;
}
.btn.small {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg,#444,#222);
  color: #fff;
}
.btn.small:hover { background: linear-gradient(135deg,#e11d48,#7f1d1d); }
.pagination a.btn.small {
  background: linear-gradient(135deg,#00f2a6,#09f);
  color: #000;
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 8px;
  margin: 0 4px;
}
.pagination a.btn.small:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

