/* ═══════════════════════════════════════════════════════════
   global.css — Mobile-first design system cho Đảo Tò Mò
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: #0a0e1a;
  color: #e2e8f0;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }

:root {
  --primary:     #6c63ff;
  --primary-dark:#4f46e5;
  --accent:      #f59e0b;
  --bg:          #0a0e1a;
  --bg-card:     #111827;
  --bg-nav:      rgba(10,14,26,0.97);
  --border:      rgba(255,255,255,0.08);
  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --success:     #10b981;
  --danger:      #ef4444;
  --radius:      12px;
  --radius-lg:   18px;
  --shadow:      0 8px 32px rgba(0,0,0,0.4);
  --nav-h:       60px;
  --ease:        0.2s ease;
}

/* ── Navbar ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 999;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo img {
  height: 34px;
  width: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(167,139,250,0.5);
  flex-shrink: 0;
  -webkit-text-fill-color: initial;
  background: none;
}
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0 10px;
  transition: background var(--ease);
}
.hamburger:hover { background: rgba(255,255,255,0.12); }
.hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#nav-list {
  display: none;
  flex-direction: column;
  position: absolute;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  animation: slideDown 0.2s ease;
}
#nav-list.open { display: flex; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

#nav-list li a {
  display: flex; align-items: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem; font-weight: 500;
  color: var(--text-muted);
  transition: all var(--ease);
  border-left: 3px solid transparent;
}
#nav-list li a:hover, #nav-list li a.active {
  color: var(--primary);
  background: rgba(108,99,255,0.08);
  border-left-color: var(--primary);
}

@media (min-width: 768px) {
  .hamburger { display: none; }
  #nav-list {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: none; border: none;
    padding: 0; gap: 2px; animation: none;
  }
  #nav-list li a {
    padding: 0.45rem 0.875rem;
    border-radius: 8px; font-size: 0.875rem;
    border-left: none;
  }
  #nav-list li a:hover, #nav-list li a.active {
    background: rgba(108,99,255,0.12); border-left: none;
  }
}

.page-body { padding-top: var(--nav-h); min-height: 100vh; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem; padding: 0.7rem 1.4rem;
  border-radius: var(--radius); font-size: 0.9rem; font-weight: 700;
  min-height: 44px; transition: all var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,99,255,0.4); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #000; font-weight: 800; }
.btn-accent:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.07); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ── Cards ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* ── Form ── */
.input {
  width: 100%; padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 0.95rem; font-family: inherit; min-height: 44px;
  transition: border-color var(--ease), background var(--ease);
}
.input:focus { outline: none; border-color: var(--primary); background: rgba(108,99,255,0.06); }
.input::placeholder { color: var(--text-muted); }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.875rem; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }

/* ── Alerts ── */
.alert {
  padding: 0.8rem 1rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; margin-bottom: 0.875rem;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-info    { background: rgba(108,99,255,0.12); border: 1px solid rgba(108,99,255,0.3); color: #c4b5fd; }
.alert-warn    { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }

/* ── Spinner ── */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.65s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section title ── */
.section-title {
  font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 800;
  text-align: center; margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Badge ── */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-purple { background: rgba(108,99,255,0.2); color: #a78bfa; }
.badge-gold   { background: rgba(245,158,11,0.2); color: #fbbf24; }
.badge-green  { background: rgba(16,185,129,0.2); color: #34d399; }
.badge-red    { background: rgba(239,68,68,0.2);  color: #f87171; }

/* ── Footer ── */
footer {
  background: #07090f; border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem 1.5rem; margin-top: 4rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem 1.5rem; max-width: 1100px; margin: 0 auto;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4,1fr); } }
.footer-col h3 { font-size: 0.875rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; }
.footer-col p, .footer-col a { display: block; font-size: 0.82rem; color: var(--text-muted); line-height: 2; transition: color var(--ease); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { max-width: 1100px; margin: 1.5rem auto 0; padding-top: 1rem; border-top: 1px solid var(--border); text-align: center; font-size: 0.78rem; color: var(--text-muted); }

/* ── Utilities ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}
.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}
