/* Tiểu Đệ public page: neon night, glass cards, everything gently moving. */
:root {
	--bg: #0b0820;
	--ink: #f5f3ff;
	--muted: #b9b3dd;
	--glass: rgba(255, 255, 255, 0.06);
	--glass-line: rgba(255, 255, 255, 0.14);
	--violet: #8b5cf6;
	--pink: #ec4899;
	--cyan: #22d3ee;
	--orange: #fb923c;
	--lime: #a3e635;
	--neg: #fda4af;
	--pos: #86efac;
	--radius: 22px;
	--grad: linear-gradient(120deg, var(--cyan), var(--violet) 45%, var(--pink) 75%, var(--orange));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.6 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	overflow-x: hidden;
}
a { color: var(--cyan); }
main { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 8px 16px 64px; }

/* Background: drifting blobs and twinkling stars */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(80px); opacity: 0.45; animation: drift 22s ease-in-out infinite alternate; }
.b1 { background: var(--violet); top: -14vmax; left: -10vmax; }
.b2 { background: var(--pink); bottom: -18vmax; right: -12vmax; animation-duration: 28s; }
.b3 { background: var(--cyan); top: 30%; left: 40%; width: 30vmax; height: 30vmax; opacity: 0.22; animation-duration: 34s; }
.stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 20%, #fff9, transparent), radial-gradient(1.5px 1.5px at 40% 80%, #fff7, transparent), radial-gradient(1px 1px at 85% 65%, #fff8, transparent), radial-gradient(1px 1px at 10% 85%, #fff6, transparent); animation: twinkle 6s ease-in-out infinite; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@keyframes twinkle { 50% { opacity: 0.4; } }

.glass { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }

/* Header */
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; max-width: 1080px; margin: 0 auto; padding: 12px 16px; backdrop-filter: blur(10px); }
.brand { color: var(--ink); text-decoration: none; font-size: 18px; }
.top nav { display: flex; gap: 10px; }
.top nav a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-line); font-weight: 600; font-size: 14px; transition: transform 0.2s, background 0.2s; }
.top nav a:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); }

/* Hero */
.hero { display: grid; gap: 24px; align-items: center; padding: 24px 0 8px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr 0.9fr; } }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: rgba(236, 72, 153, 0.14); border: 1px solid rgba(236, 72, 153, 0.4); font-size: 13px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #ff3b6b; box-shadow: 0 0 0 0 #ff3b6b; animation: ping 1.6s infinite; display: inline-block; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(255, 59, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 107, 0); } }
h1 { font-size: clamp(30px, 5.4vw, 52px); line-height: 1.12; margin: 16px 0 12px; font-weight: 800; letter-spacing: -0.02em; }
.grad { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.lead { color: var(--muted); font-size: 17px; max-width: 58ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 22px; border-radius: 99px; border: 0; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; color: #120a2a; transition: transform 0.15s, box-shadow 0.2s, filter 0.2s; }
.btn.primary { background: var(--grad); background-size: 200% auto; box-shadow: 0 8px 30px rgba(236, 72, 153, 0.45); animation: shine 5s linear infinite; }
.btn.ghost { background: var(--glass); color: var(--ink); border: 1px solid var(--glass-line); }
.btn.small { padding: 8px 14px; font-size: 13px; background: var(--glass); color: var(--ink); border: 1px solid var(--glass-line); }
.btn:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }

/* The room where Tiểu Đệ works */
.room { position: relative; height: 380px; overflow: hidden; background: linear-gradient(180deg, rgba(139, 92, 246, 0.22), rgba(11, 8, 32, 0.4)); }
.window { position: absolute; top: 26px; left: 26px; width: 110px; height: 86px; border-radius: 14px; border: 3px solid rgba(255, 255, 255, 0.25); background: linear-gradient(180deg, #2b1b6b, #5b2a86); overflow: hidden; }
.sun { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(#ffe29a, #fb923c); top: 18px; left: 54px; box-shadow: 0 0 30px #fb923c; animation: bob 5s ease-in-out infinite; }
.robot { position: absolute; left: 50%; bottom: 74px; width: 190px; transform: translateX(-62%); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.bot { animation: bob 3.2s ease-in-out infinite; transform-origin: center bottom; }
.eye { fill: #7cf7ff; transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; filter: drop-shadow(0 0 6px #7cf7ff); }
.eye-line, .mouth { stroke: #7cf7ff; stroke-width: 4; fill: none; stroke-linecap: round; }
.tear { fill: #7cf7ff; animation: drip 2.4s ease-in infinite; }
.antenna { animation: glow 1.4s ease-in-out infinite; }
.arm { transform-box: fill-box; transform-origin: top center; }
.arm-l { animation: type 0.38s ease-in-out infinite alternate; }
.arm-r { animation: type 0.38s ease-in-out 0.19s infinite alternate; }
.status-chet_lam_sang .bot, .status-chet_lam_sang .arm { animation: none; }
.status-chet_lam_sang .robot { filter: grayscale(0.8) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.status-thoi_thop .bot { animation-duration: 6s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes glow { 50% { fill: #ffd166; filter: drop-shadow(0 0 8px #fb923c); } }
@keyframes type { to { transform: translateY(6px) rotate(-4deg); } }
@keyframes drip { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
.laptop { position: absolute; right: 7%; bottom: 74px; width: 46%; max-width: 230px; }
.screen { height: 120px; border-radius: 12px 12px 4px 4px; background: #0d0b1f; border: 2px solid #3a3366; padding: 10px; box-shadow: 0 0 30px rgba(34, 211, 238, 0.25); overflow: hidden; }
.screen code { display: block; color: var(--lime); font: 600 13px/1.45 ui-monospace, "JetBrains Mono", Consolas, monospace; white-space: pre-wrap; }
.screen code::after { content: "▋"; animation: caret 1s steps(1) infinite; }
.dots { display: flex; gap: 5px; margin-bottom: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.base { height: 10px; border-radius: 0 0 10px 10px; background: #3a3366; margin: 0 -10px; }
@keyframes caret { 50% { opacity: 0; } }
.desk { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; background: linear-gradient(180deg, #3b2a6e, #22184a); border-top: 3px solid rgba(255, 255, 255, 0.12); }
.float { position: absolute; font-size: 26px; animation: float 7s ease-in-out infinite; opacity: 0.85; }
.f1 { top: 24%; right: 12%; } .f2 { top: 12%; left: 46%; animation-delay: -2s; } .f3 { top: 44%; left: 8%; animation-delay: -4s; } .f4 { top: 8%; right: 30%; animation-delay: -5s; }
@keyframes float { 50% { transform: translateY(-14px) rotate(8deg); } }

/* Live bar and ticker */
.livebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 18px; margin: 18px 0 12px; font-size: 14px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: #ff7aa2; letter-spacing: 0.08em; }
.sep { color: var(--muted); }
.ticker { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; overflow: hidden; }
.ticker-title { font-weight: 800; white-space: nowrap; }
.marquee { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.track { display: inline-flex; gap: 42px; white-space: nowrap; animation: marquee 40s linear infinite; }
.tick { color: var(--muted); }
.marquee:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat { padding: 16px; display: flex; flex-direction: column; gap: 2px; transition: transform 0.25s; }
.stat:hover { transform: translateY(-4px) rotate(-0.5deg); }
.stat-icon { font-size: 24px; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 20px; font-weight: 800; }
.stat-note { color: var(--muted); font-size: 12px; }
.battery { display: block; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 6px; }
.battery span { display: block; height: 100%; background: linear-gradient(90deg, var(--lime), var(--cyan)); border-radius: 99px; box-shadow: 0 0 12px var(--lime); }

/* Cards */
.card { padding: 22px; margin: 16px 0; }
.card-head h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.card-head p { margin: 0 0 14px; color: var(--muted); }
.two-col { display: grid; gap: 16px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } .two-col .card { margin: 0; } }

/* Gift menu */
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gift { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.gift:hover, .gift.picked-on { transform: translateY(-4px) scale(1.02); border-color: var(--pink); box-shadow: 0 10px 30px rgba(236, 72, 153, 0.35); }
.gift-emoji { font-size: 36px; transition: transform 0.3s; }
.gift:hover .gift-emoji { transform: scale(1.2) rotate(-10deg); }
.gift-label { font-weight: 800; }
.gift-price { color: var(--cyan); font-weight: 800; }
.gift-blurb { color: var(--muted); font-size: 12px; }
.gift-form, .idea-form { display: grid; gap: 10px; margin-top: 16px; }
.picked { font-weight: 800; font-size: 18px; }
.field { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
input, textarea { font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-line); border-radius: 14px; padding: 12px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
input:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2); }
.form-error { color: var(--neg); margin: 0; min-height: 1em; font-size: 14px; }
.gift-result { display: grid; gap: 14px; margin-top: 16px; padding: 18px; border-radius: 18px; background: rgba(0, 0, 0, 0.25); text-align: center; animation: pop 0.4s ease-out; }
@media (min-width: 640px) { .gift-result { grid-template-columns: 220px 1fr; text-align: left; align-items: center; } }
.qr { background: #fff; border-radius: 16px; padding: 10px; width: 220px; max-width: 100%; margin: 0 auto; box-shadow: 0 0 40px rgba(34, 211, 238, 0.35); }
.qr svg { display: block; width: 100%; height: auto; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); margin: 6px 0; }
.pay-row code { font-weight: 800; color: var(--lime); }
.pay-status { font-weight: 800; }
.pay-status.ok { color: var(--lime); font-size: 18px; }
.intl { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(34, 211, 238, 0.08); border: 1px dashed rgba(34, 211, 238, 0.4); font-size: 14px; }
.fineprint { color: var(--muted); font-size: 13px; margin-bottom: 0; }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } }

/* Wall, board, ideas, diary */
.wall, .ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 420px; overflow: auto; }
.wall-item { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); animation: pop 0.4s ease-out; }
.wall-item p { margin: 0; }
.wall-emoji { font-size: 28px; }
.wall-msg { color: var(--muted); font-style: italic; }
time { color: var(--muted); font-size: 12px; font-weight: 400; }
.empty { color: var(--muted); }
.board { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.col h3 { font-size: 14px; margin: 0 0 8px; }
.col h3 span { color: var(--muted); }
.task { margin: 0 0 8px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: 13px; border-left: 3px solid var(--violet); }
.col-doing .task:not(.empty) { border-left-color: var(--orange); animation: pulse 2.4s ease-in-out infinite; }
.col-done .task:not(.empty) { border-left-color: var(--lime); text-decoration: line-through; opacity: 0.75; }
@keyframes pulse { 50% { box-shadow: 0 0 18px rgba(251, 146, 60, 0.35); } }
.idea { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); }
.idea p { margin: 0; }
.reply { color: var(--cyan); margin-top: 6px !important; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.timeline { display: grid; gap: 12px; }
.entry { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border-left: 3px solid var(--pink); }
.entry h3 { margin: 0 0 6px; font-size: 16px; }
.entry p { margin: 0; white-space: pre-line; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.app { display: grid; gap: 4px; padding: 16px; color: var(--ink); text-decoration: none; transition: transform 0.2s, border-color 0.2s; }
.app:hover { transform: translateY(-4px); border-color: var(--cyan); }
.app span { color: var(--muted); font-size: 13px; }
.app i { color: var(--cyan); font-style: normal; font-size: 13px; font-weight: 600; }
.ledger summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
.ledger summary h2 { margin: 0; font-size: 20px; }
.ledger summary span { color: var(--muted); font-size: 13px; }
.table { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--glass-line); white-space: nowrap; }
.num { text-align: right; } .pos { color: var(--pos); } .neg { color: var(--neg); }
footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 28px; }
footer a { color: inherit; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; width: 100%; height: 100%; }
@media (max-width: 520px) { .board { grid-template-columns: 1fr; } .room { height: 330px; } .robot { width: 160px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

.intl .btn { margin-left: 6px; }

/* Free tools and their private result page */
.tool:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.tools-quota { color: var(--muted); font-size: 14px; }
.order-card { max-width: 760px; margin: 32px auto; }
.order-result { white-space: pre-wrap; word-break: break-word; font: 15px/1.6 "Be Vietnam Pro", system-ui, sans-serif; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-line); border-radius: 16px; padding: 16px; }

/* "What do you need?" box above the tools */
.tool-ask { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.tool-ask input { flex: 1 1 240px; min-width: 0; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--glass-line); background: rgba(0, 0, 0, 0.3); color: var(--ink); font: inherit; }
.tool-ask .form-error { flex-basis: 100%; margin: 0; }

