:root {
  --bg: #0b0c14; --bg2: #11131e; --panel: #161927; --panel2: #1c2031; --line: #272c40;
  --text: #eef0f7; --muted: #8b91a8; --accent: #ff3d7f; --accent2: #8b5cf6; --gold: #ffd166;
  --ok: #2fd27a; --warn: #ffb020; --err: #ff5563;
  --radius: 14px;
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(11,12,20,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-size: 15px; box-shadow: 0 0 20px rgba(255,61,127,.4); }
.nav .links { display: flex; gap: 18px; margin-left: 12px; }
.nav .links a { text-decoration: none; color: var(--muted); font-size: 14px; }
.nav .links a:hover { color: var(--text); }
.nav .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) { .nav .links { display: none; } }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--accent); color: #fff; transition: transform .1s, opacity .2s; white-space: nowrap; }
.btn:hover { opacity: .92; } .btn:active { transform: scale(.98); }
.btn.grad { background: var(--grad); box-shadow: 0 6px 24px rgba(255,61,127,.3); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.btn.ghost:hover { background: var(--panel2); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: var(--err); }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,61,127,.15); }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
input[type=range] { padding: 0; accent-color: var(--accent); }
input[type=color] { padding: 2px; height: 40px; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
label.check { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; cursor: pointer; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line); }
.badge.ok { color: var(--ok); border-color: rgba(47,210,122,.3); background: rgba(47,210,122,.08); }
.badge.warn { color: var(--warn); border-color: rgba(255,176,32,.3); background: rgba(255,176,32,.08); }
.badge.err { color: var(--err); border-color: rgba(255,85,99,.3); background: rgba(255,85,99,.08); }
.badge.plan { background: var(--grad); border: 0; color: #fff; }
.alert-box { padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; display: none; }
.alert-box.show { display: block; }
.alert-box.err { background: rgba(255,85,99,.1); border: 1px solid rgba(255,85,99,.3); color: #ffb3ba; }
.alert-box.ok { background: rgba(47,210,122,.1); border: 1px solid rgba(47,210,122,.3); color: #a8f0c8; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--panel2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 10px; opacity: 0; transition: .25s; z-index: 100; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* Auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth .stage { position: relative; overflow: hidden; background: radial-gradient(circle at 30% 20%, rgba(255,61,127,.25), transparent 50%), radial-gradient(circle at 80% 80%, rgba(139,92,246,.25), transparent 50%), var(--bg2); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth .stage h2 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; }
.auth .stage p { color: var(--muted); max-width: 420px; }
.auth .form { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth .form > div { width: 100%; max-width: 380px; }
.auth h1 { font-size: 26px; margin: 0 0 6px; }
.auth .sub { color: var(--muted); margin: 0 0 24px; }
.auth .switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.auth .switch a { color: var(--accent); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .stage { display: none; } }

.floaty { position: absolute; font-size: 40px; animation: floaty 6s ease-in-out infinite; opacity: .9; }
@keyframes floaty { 50% { transform: translateY(-18px) rotate(8deg); } }

footer.site { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; margin-top: 60px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
footer.site a { color: var(--muted); text-decoration: none; margin-right: 14px; }

/* Plans & contact (trang chủ + bảng giá) */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px rgba(255,61,127,.15); }
.plan .ribbon { position: absolute; top: -11px; right: 16px; background: var(--grad); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.plan h3 { margin: 0; font-size: 20px; }
.plan .price { font-size: 22px; font-weight: 800; margin: 10px 0 14px; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.plan li { padding: 5px 0 5px 24px; position: relative; font-size: 14px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; max-width: 820px; margin: 0 auto; }
.contact a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.contact .ic { font-size: 26px; }
.contact small { display: block; color: var(--muted); }
