/* =============================================================================
 *  GetLink — style.css  |  Modern Dark Mode (#0f172a · accent #38bdf8)
 *  Không dùng framework/CSS CDN ⇒ 0 request ngoài, tải < 1s.
 *  Mục lục:
 *    01. Biến & reset        06. Kết quả (file / picker / audio)
 *    02. Header & nút        07. Lỗi
 *    03. Hero & ô nhập link  08. Hướng dẫn & FAQ
 *    04. Chip tuỳ chọn       09. Footer
 *    05. Loading & skeleton  10. Modal · Toast · Responsive
 * ========================================================================== */

/* ---------------------------------------------------------------- 01. BIẾN */
:root {
  /* Bảng màu */
  --bg:            #0f172a;
  --bg-deep:       #080f1f;
  --surface:       rgba(30, 41, 59, .55);
  --surface-solid: #172033;
  --surface-2:     rgba(51, 65, 85, .38);
  --border:        rgba(148, 163, 184, .16);
  --border-strong: rgba(148, 163, 184, .3);

  --text:          #e8eefb;
  --text-soft:     #b6c2d9;
  --text-muted:    #7d8ba5;

  --accent:        #38bdf8;   /* accent chính theo yêu cầu */
  --accent-2:      #818cf8;
  --accent-3:      #22d3ee;
  --accent-soft:   rgba(56, 189, 248, .13);
  --accent-ring:   rgba(56, 189, 248, .38);

  --ok:            #34d399;
  --warn:          #fbbf24;
  --danger:        #f87171;

  /* Hình khối & chuyển động */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 2px 10px rgba(2, 6, 23, .45);
  --shadow-md: 0 14px 40px rgba(2, 6, 23, .55);
  --shadow-glow: 0 14px 44px rgba(56, 189, 248, .22);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .28s;

  --wrap: 880px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue',
          Roboto, 'Noto Sans', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Nền động: 2 vầng sáng gradient + lưới mờ, thuần CSS (0 ảnh) */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: auto;
  z-index: -2;
  pointer-events: none;
  filter: blur(90px);
  opacity: .5;
}
body::before {
  width: 46rem; height: 46rem; top: -18rem; left: -14rem;
  background: radial-gradient(circle at center, rgba(56, 189, 248, .30), transparent 68%);
  animation: float 18s var(--ease) infinite alternate;
}
body::after {
  width: 42rem; height: 42rem; bottom: -20rem; right: -14rem;
  background: radial-gradient(circle at center, rgba(129, 140, 248, .26), transparent 68%);
  animation: float 22s var(--ease) infinite alternate-reverse;
}

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3rem, 2.5rem, 0) scale(1.12); }
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--mono); font-size: .87em; padding: .12em .42em;
  background: rgba(56, 189, 248, .1); border: 1px solid var(--border);
  border-radius: 6px; color: var(--accent);
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

::selection { background: var(--accent-ring); color: #04131f; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

/* ------------------------------------------------------- 02. HEADER & NÚT */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(15, 23, 42, .78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 64px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }

.brand-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  color: #04131f;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 6px 18px rgba(56, 189, 248, .35);
  transition: transform var(--dur) var(--ease);
}
.brand:hover .brand-icon { transform: rotate(-8deg) scale(1.06); }

.brand-name { font-weight: 800; font-size: 1.22rem; letter-spacing: -.03em; }
.brand-name span {
  background: linear-gradient(100deg, var(--accent), var(--accent-2), var(--accent-3));
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmerText 6s linear infinite;
}
@keyframes shimmerText { to { background-position: 220% center; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  font: inherit; font-weight: 600;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background var(--dur), border-color var(--dur), box-shadow var(--dur), opacity var(--dur);
}
.btn:hover  { background: rgba(71, 85, 105, .5); border-color: var(--border-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  border-color: transparent;
  color: #04131f;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #7dd3fc, var(--accent));
  box-shadow: 0 18px 46px rgba(56, 189, 248, .34);
}

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent-ring); }

.btn-sm { padding: 8px 14px; font-size: .875rem; border-radius: var(--r-sm); }

/* ------------------------------------------------- 03. HERO & Ô NHẬP LINK */
.hero { padding: 64px 0 30px; text-align: center; animation: rise .6s var(--ease) both; }

.hero-title { font-size: clamp(2rem, 6vw, 3.15rem); font-weight: 800; margin-bottom: 14px; }
.hero-title .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 45%, var(--accent-3));
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmerText 7s linear infinite;
}
.hero-sub { color: var(--text-soft); font-size: clamp(.95rem, 2.4vw, 1.06rem); margin-bottom: 32px; }

.url-box { animation: rise .7s var(--ease) .08s both; }

.url-field {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 16px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.url-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md);
}
.url-field.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(248, 113, 113, .16); }

.url-icon { color: var(--text-muted); flex: none; }
.url-field:focus-within .url-icon { color: var(--accent); }

#urlInput {
  flex: 1 1 auto; min-width: 0;
  padding: 14px 0;
  font: inherit; font-size: 1rem;
  color: var(--text); background: none; border: 0; outline: none;
}
#urlInput::placeholder { color: var(--text-muted); }

.url-clear {
  flex: none; width: 30px; height: 30px; margin-right: 4px;
  display: grid; place-items: center;
  font-size: 1.3rem; line-height: 1;
  color: var(--text-muted);
  background: transparent; border: 0; border-radius: 50%;
  cursor: pointer; transition: color var(--dur), background var(--dur);
}
.url-clear:hover { color: var(--danger); background: rgba(248, 113, 113, .12); }

.url-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.url-actions .btn { min-width: 148px; }

/* ------------------------------------------------------- 04. CHIP TUỲ CHỌN */
.options {
  display: grid; gap: 14px;
  margin-top: 26px; padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(10px);
  animation: rise .7s var(--ease) .14s both;
}

.option-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.option-label {
  flex: none; min-width: 78px;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); text-align: left;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  padding: 7px 14px;
  font: inherit; font-size: .86rem; font-weight: 600;
  color: var(--text-soft);
  background: rgba(148, 163, 184, .1);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--accent-ring); transform: translateY(-1px); }
.chip.is-active {
  color: #04131f;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(56, 189, 248, .3);
}

.platforms {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 22px;
}
.platform-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  font-size: .82rem; color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: default;
  transition: all var(--dur) var(--ease);
}
.platform-chip::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .8;
}
.platform-chip:hover { color: var(--accent); border-color: var(--accent-ring); transform: translateY(-2px); }
.platform-chip[data-platform="youtube"]:hover   { color: #ff4d4d; }
.platform-chip[data-platform="facebook"]:hover  { color: #4d94ff; }
.platform-chip[data-platform="instagram"]:hover { color: #e879a8; }
.platform-chip[data-platform="tiktok"]:hover    { color: #2dd4bf; }
.platform-chip[data-platform="twitter"]:hover   { color: #9fb3c8; }
.platform-chip[data-platform="soundcloud"]:hover{ color: #ff8a3d; }
.platform-chip[data-platform="reddit"]:hover    { color: #ff6b35; }
.platform-chip[data-platform="pinterest"]:hover { color: #ef4444; }

/* --------------------------------------------------- 05. PANEL & SKELETON */
.panel {
  margin: 26px auto;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  animation: rise .45s var(--ease) both;
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.loading-head { display: flex; align-items: center; gap: 16px; }
.loading-title { font-weight: 700; margin: 0 0 2px; }
.loading-sub { margin: 0; color: var(--text-muted); font-size: .9rem; }

.spinner {
  flex: none; width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, .18);
  border-top-color: var(--accent);
  border-right-color: var(--accent-3);
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-grid { display: grid; gap: 10px; margin-top: 20px; }
.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, rgba(148,163,184,.08) 25%, rgba(148,163,184,.2) 37%, rgba(148,163,184,.08) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}
.skeleton-card { height: 78px; }
.skeleton-line { height: 12px; }
.skeleton-line.short { width: 42%; }
@keyframes skeleton { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--text-soft); letter-spacing: .02em; text-transform: uppercase; }

/* --------------------------------------------- 06. KẾT QUẢ & CÁC DẠNG RENDER */
.result-body { display: grid; gap: 14px; }

.result-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  animation: rise .4s var(--ease) both;
  transition: border-color var(--dur), transform var(--dur), box-shadow var(--dur);
}
.result-card:hover { border-color: var(--accent-ring); transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.result-thumb {
  flex: none; width: 108px; aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.result-meta { flex: 1 1 auto; min-width: 0; }
.result-filename {
  font-weight: 600; font-size: .95rem;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.result-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
}
.badge.badge-ok   { color: var(--ok);     background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .35); }
.badge.badge-warn { color: var(--warn);   background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .35); }
.badge.badge-mute { color: var(--text-muted); background: rgba(148, 163, 184, .12); border-color: var(--border-strong); }

.dl-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  font-weight: 700; font-size: .9rem; color: #04131f;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  border-radius: var(--r-md);
  box-shadow: 0 8px 22px rgba(56, 189, 248, .28);
  transition: transform .18s var(--ease), box-shadow var(--dur);
}
.dl-btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(56, 189, 248, .38); }

/* Lưới picker (album IG / slide TikTok) */
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.picker-item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  animation: rise .4s var(--ease) both;
  transition: transform var(--dur) var(--ease), border-color var(--dur);
}
.picker-item:hover { transform: translateY(-3px) scale(1.01); border-color: var(--accent-ring); }
.picker-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.picker-item .picker-ph {
  width: 100%; aspect-ratio: 1;
  display: grid; place-items: center;
  color: var(--text-muted); font-size: 1.6rem;
}
.picker-item .badge { position: absolute; top: 8px; left: 8px; backdrop-filter: blur(6px); }
.picker-item .picker-overlay {
  position: absolute; inset: auto 0 0 0;
  padding: 22px 10px 10px;
  font-size: .8rem; font-weight: 700; color: #fff;
  background: linear-gradient(to top, rgba(2, 6, 23, .88), transparent);
  opacity: 0; transition: opacity var(--dur);
}
.picker-item:hover .picker-overlay { opacity: 1; }

.audio-player {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.audio-player audio { flex: 1 1 260px; height: 40px; }

.notice {
  padding: 12px 15px;
  font-size: .88rem; color: var(--text-soft);
  background: rgba(56, 189, 248, .08);
  border: 1px solid var(--accent-ring);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
}
.notice strong { color: var(--text); }
.notice-warn {
  background: rgba(251, 191, 36, .08);
  border-color: rgba(251, 191, 36, .35);
  border-left-color: var(--warn);
}

/* ---------------------------------------------------------------- 07. LỖI */
.error-panel {
  display: flex; gap: 16px; align-items: flex-start;
  border-color: rgba(248, 113, 113, .45);
  background: linear-gradient(180deg, rgba(248, 113, 113, .1), var(--surface));
}
.error-icon {
  flex: none; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  color: var(--danger); background: rgba(248, 113, 113, .14);
}
.error-text { flex: 1 1 auto; min-width: 0; }
.error-title { font-size: 1.02rem; margin: 0 0 6px; color: #fecaca; }
.error-detail { margin: 0 0 8px; color: var(--text-soft); font-size: .92rem; }
.error-code {
  margin: 0 0 12px;
  font-family: var(--mono); font-size: .78rem; color: var(--text-muted);
  overflow-wrap: anywhere;
}
.error-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------- 08. HƯỚNG DẪN & FAQ */
.features { padding: 46px 0 10px; }
.section-title { font-size: clamp(1.25rem, 3.6vw, 1.6rem); text-align: center; margin-bottom: 26px; }

.steps-grid {
  list-style: none; margin: 0 0 52px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.step-card {
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform var(--dur) var(--ease), border-color var(--dur), box-shadow var(--dur);
}
.step-card:hover { transform: translateY(-4px); border-color: var(--accent-ring); box-shadow: var(--shadow-glow); }
.step-card h3 { font-size: 1rem; margin-bottom: 6px; }
.step-card p { margin: 0; color: var(--text-soft); font-size: .9rem; }
.step-num {
  display: grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 12px;
  font-weight: 800; color: #04131f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(56, 189, 248, .28);
}

.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px 18px;
  transition: border-color var(--dur), background var(--dur);
}
.faq details[open] { border-color: var(--accent-ring); background: rgba(30, 41, 59, .7); }
.faq summary {
  cursor: pointer; padding: 13px 0;
  font-weight: 600; font-size: .95rem;
  list-style: none; display: flex; align-items: center; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; margin-left: auto;
  font-size: 1.25rem; font-weight: 400; color: var(--accent);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 14px; color: var(--text-soft); font-size: .9rem; }

/* ---------------------------------------------------------------- 09. FOOTER */
.site-footer { margin-top: 60px; border-top: 1px solid var(--border); background: rgba(8, 15, 31, .6); }
.footer-inner { padding: 30px 20px 38px; text-align: center; }
.footer-brand { font-weight: 800; font-size: 1.02rem; margin-bottom: 8px; }
.footer-brand span {
  background: linear-gradient(100deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-note { color: var(--text-muted); font-size: .85rem; max-width: 620px; margin-inline: auto; }
.footer-endpoint { color: var(--text-muted); font-size: .8rem; margin: 0; }

/* --------------------------------------------- 10. MODAL · TOAST · RESPONSIVE */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(6px);
  animation: fade .25s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px rgba(2, 6, 23, .75);
  animation: rise .32s var(--ease) both;
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 1.08rem; margin: 0; }
.modal-close {
  width: 32px; height: 32px;
  font-size: 1.4rem; line-height: 1;
  color: var(--text-muted);
  background: transparent; border: 0; border-radius: 50%;
  cursor: pointer; transition: color var(--dur), background var(--dur);
}
.modal-close:hover { color: var(--danger); background: rgba(248, 113, 113, .12); }

.modal-body { padding: 20px 22px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field-label { font-weight: 600; font-size: .9rem; }
.field-label em { color: var(--text-muted); font-style: normal; font-weight: 400; }
.field input {
  padding: 12px 14px;
  font: inherit; font-size: .92rem;
  color: var(--text);
  background: rgba(15, 23, 42, .8);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-hint { font-size: .8rem; color: var(--text-muted); }

.modal-status { font-size: .85rem; min-height: 1.2em; }
.modal-status.is-ok   { color: var(--ok); }
.modal-status.is-err  { color: var(--danger); }
.modal-status.is-load { color: var(--text-muted); }

.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, .5);
}
.modal-foot-right { display: flex; gap: 10px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 70;
  transform: translateX(-50%);
  max-width: min(92vw, 460px);
  padding: 13px 20px;
  font-size: .9rem; font-weight: 500;
  color: var(--text);
  background: rgba(23, 32, 51, .97);
  border: 1px solid var(--accent-ring);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  animation: toastIn .32s var(--ease) both;
}
.toast.is-error { border-color: rgba(248, 113, 113, .55); color: #fecaca; }
.toast.is-ok    { border-color: rgba(52, 211, 153, .5); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* -------------------------------------------------------------- RESPONSIVE */
@media (max-width: 720px) {
  .hero { padding-top: 44px; }
  .url-field { flex-wrap: wrap; padding: 12px; border-radius: var(--r-md); }
  #urlInput { padding: 8px 0; flex-basis: 100%; order: 2; }
  .url-icon { order: 1; }
  .url-clear { order: 3; position: absolute; right: 8px; }
  .url-field { position: relative; }
  .url-actions .btn { flex: 1 1 100%; }
  .option-group { align-items: flex-start; flex-direction: column; gap: 8px; }
  .option-label { min-width: auto; }
  .panel { padding: 18px; border-radius: var(--r-md); }
  .result-card { flex-wrap: wrap; }
  .result-thumb { width: 100%; aspect-ratio: 16 / 9; }
  .dl-btn { width: 100%; justify-content: center; }
  .picker-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .modal-card { border-radius: var(--r-lg); }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-foot-right { flex-direction: column; }
}

@media (max-width: 400px) {
  .chips .chip { padding: 6px 11px; font-size: .8rem; }
  .brand-name { font-size: 1.08rem; }
}

/* Người dùng tắt hiệu ứng động */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* In ấn */
@media print {
  body::before, body::after, .site-header, .site-footer, .options, .platforms, .features { display: none !important; }
  body { background: #fff; color: #000; }
}
