/* =========================================================
   PhimHay — Mobile UI CSS
   Matching: dark bg, hero carousel, chips, bottom nav, drawer
   ========================================================= */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0f14;
  --bg-card:     #181b23;
  --bg-surface:  #1e2130;
  --accent:      #f5c518;   /* IMDb yellow / CTA */
  --accent-dim:  rgba(245,197,24,.15);
  --text:        #f0f0f0;
  --text-sub:    #9aa0b4;
  --text-muted:  #5c627a;
  --border:      rgba(255,255,255,.08);
  --radius-card: 14px;
  --radius-pill: 999px;
  --nav-h:       64px;
  --header-h:    calc(54px + env(safe-area-inset-top));
  --font:        'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
}

@media (max-width: 768px) {
  .m-ios-pwa-hint {
    display: none;
    margin: 12px 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(245, 197, 24, 0.18);
    color: var(--text-sub);
    line-height: 1.55;
  }

  body.is-ios-pwa .m-ios-pwa-hint {
    display: block;
  }
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

a { color: inherit; text-decoration: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
img { display: block; max-width: 100%; -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }
button { background: none; border: none; cursor: pointer; padding: 0; color: inherit; }

/* ── Top Header ── */
.m-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  padding-bottom: 0;
  padding-left: 12px;
  padding-right: 12px;
  background: rgba(13,15,20,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.m-header-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.m-header-logo-img {
  display: block;
  width: auto;
  height: 28px;
  max-width: 120px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.m-header-logo-text {
  display: none;
}

.m-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.m-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  transition: background .15s;
  position: relative;
}
.m-header-btn:active { background: var(--bg-surface); }

.m-header-btn-notif {
  color: var(--accent);
}

.m-header-btn-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.m-header-btn-badge.is-active {
  opacity: 1;
}

.page-notifications .m-notif-page {
  margin-top: 0;
  margin-bottom: 26px;
}

body.page-notifications .m-header {
  position: sticky;
}

.m-notif-page {
  margin-top: 12px;
  margin-bottom: 26px;
}

.m-notif-page h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

.m-notif-page p {
  color: var(--text-sub);
  margin-bottom: 20px;
}

.m-notif-section {
  margin-bottom: 22px;
  display: grid;
  gap: 12px;
}

.m-notif-section h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.m-notif-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  width: 100%;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 28px rgba(0,0,0,0.14);
  overflow: hidden;
  align-items: center;
}

.m-notif-card:hover {
  transform: translateY(-1px);
  border-color: rgba(245,197,24,.35);
  background: rgba(255,255,255,.08);
}

.m-notif-card-image {
  width: 100%;
  min-width: 92px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.16));
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-notif-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.m-notif-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.65);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .15em;
  padding: 12px;
  text-align: center;
}

.m-notif-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

#m-reminder-list {
  display: grid;
  gap: 12px;
}

.m-notif-card-title {
  font-size: 15px;
  font-weight: 700;
}

.m-notif-card-meta,
.m-notif-card-note {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
}

.m-notif-empty {
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.12);
  color: var(--text-sub);
}

.m-reminder-toggle {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(245,197,24,.12);
  border: 1px solid rgba(245,197,24,.22);
  color: var(--text);
  font-weight: 600;
}

.m-reminder-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(10,10,14,.94);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.m-reminder-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Drawer Backdrop ── */
.m-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .28s ease;
}
.m-drawer-backdrop.is-open { opacity: 1; }

/* ── Drawer ── */
.m-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 400;
  width: min(300px, 82vw);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.m-drawer.is-open { transform: translateX(0); }

.m-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.m-drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.m-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.m-drawer-nav a {
  padding: 12px 20px;
  font-size: 15px;
  color: var(--text);
  transition: background .12s;
}
.m-drawer-nav a:active { background: var(--bg-surface); }

.m-drawer-muted { color: var(--text-muted) !important; }

.m-drawer-genres {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.m-drawer-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.m-drawer-genre-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
}

.m-drawer-genre-links a {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-surface);
  transition: border-color .15s, color .15s;
}
.m-drawer-genre-links a:active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Hero Section ── */
.m-home-hero {
  position: relative;
  background: var(--bg);
  padding-bottom: 8px;
  overflow: hidden;
  margin-top: 0;
}

/* Dynamic atmospheric blurred backdrop crossfader */
.m-hero-backdrop-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--slide-w, 220px) * 1.5);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.m-hero-backdrop-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.45) saturate(1.35);
  transform: scale(1.18);
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.m-hero-backdrop-item.is-active {
  opacity: 1;
}

.m-hero-backdrop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10, 12, 17, 0.15) 0%, var(--bg) 95%);
  z-index: 1;
}

/* Swiper Coverflow — Netflix-style 3D carousel */
.m-hero-carousel {
  position: relative;
  overflow: hidden;
  padding: 4px 0 0;
  z-index: 2;
}

.m-hero-swiper {
  --slide-w: clamp(168px, 46vw, 220px);
  width: 100%;
  height: calc(var(--slide-w) * 1.5 + 20px);
  overflow: visible;
  padding: 4px 0 8px;
}

.m-hero-swiper .swiper-wrapper {
  align-items: center;
}

.m-hero-swiper .swiper-slide {
  width: var(--slide-w);
  height: auto;
  flex: 0 0 auto;
  display: flex;
}

.m-hero-slide {
  width: 100%;
  position: relative;
}

.m-hero-poster-link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.62);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

.m-hero-swiper .swiper-slide-active .m-hero-poster-link {
  border-color: #fff;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.75),
    0 0 24px rgba(255, 255, 255, 0.08);
}

.m-hero-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .m-hero-swiper .swiper-wrapper {
    transition-duration: 0.2s !important;
  }
}

/* Info panel beneath carousel — flow layout, không absolute (tránh đè chip) */
.m-hero-info-wrap {
  position: relative;
  padding: 0 16px 10px;
  z-index: 2;
  overflow: hidden;
}

.m-hero-panel {
  display: none;
  padding: 0;
  animation: m-hero-panel-in .25s ease;
}
.m-hero-panel.is-active {
  display: block;
}

@keyframes m-hero-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.m-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: -.2px;
  margin-bottom: 3px;
  line-height: 1.25;
}

.m-hero-origin {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  margin-bottom: 14px;
}

/* CTA buttons */
.m-hero-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.m-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  transition: filter .15s, transform .1s;
}
.m-btn:active { transform: scale(.97); filter: brightness(.9); }

.m-btn-watch {
  background: var(--accent);
  color: #1a1100;
}

.m-btn-info {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Pill badges */
.m-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

.m-pill {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-sub);
  background: var(--bg-surface);
  letter-spacing: .2px;
}

.m-pill-imdb {
  background: var(--accent-dim);
  border-color: rgba(245,197,24,.4);
  color: var(--accent);
}

/* Description */
.m-hero-desc {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.9em;
  margin-bottom: 0;
}
.m-hero-desc--muted { color: var(--text-muted); }

/* Dots */
.m-hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 6px;
  position: relative;
  z-index: 2;               /* dots nằm trên */
}

.m-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: background .2s, transform .2s, width .2s;
}
.m-hero-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  width: 22px;
  border-radius: 4px;
}

/* ── Category Chips ── */
.m-home-chips {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 5;
  background: var(--bg);
  padding: 10px 14px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.m-home-chips::-webkit-scrollbar { display: none; }

.m-chip {
  scroll-snap-align: start;
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-sub);
  background: transparent;
  transition: border-color .18s, color .18s, background .18s;
  white-space: nowrap;
}

.m-chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.m-chip--genres {
  /* slightly different to hint dropdown */
}

/* ── Content sections (hidden/shown by chip) ── */
.m-cat-hidden { display: none !important; }

/* ── Home feed — rail phim mobile ── */
/* Home feed container - added bottom padding to prevent overlap with bottom nav */
.m-home-feed {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding-bottom: calc(var(--nav-h) + 24px); /* extra space for bottom navigation */
}

.m-rail-section {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 4px;
}

.m-rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
}

.m-rail-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.2px;
  line-height: 1.2;
  margin: 0;
}

.m-rail-more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.m-movie-row,
.m-country-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 14px 12px;
}

.m-movie-row::-webkit-scrollbar,
.m-country-row::-webkit-scrollbar {
  display: none;
}

.m-movie-card {
  flex-shrink: 0;
  width: 132px;
  scroll-snap-align: start;
  display: block;
}

.m-movie-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-surface);
  margin-bottom: 8px;
}

.m-movie-poster-wrap::after {
  content: '';
  position: absolute;
  inset: 45% 0 0 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}

.m-movie-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--accent);
  color: #1a1100;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-movie-badges {
  max-height: 42px;
  overflow: hidden;
}

.m-movie-badges .m-badge:nth-child(n+3) {
  display: none;
}

.m-movie-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-movie-origin {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.m-cta-section {
  padding: 8px 14px 20px;
}

.m-cta-box {
  text-align: center;
  padding: 22px 18px;
  border-radius: 16px;
  border: 1px solid rgba(229, 9, 20, 0.25);
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.12), rgba(229, 9, 20, 0.04));
}

.m-cta-emoji {
  font-size: 32px;
  margin-bottom: 8px;
}

.m-cta-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.m-cta-desc {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.m-cta-actions {
  display: flex;
  gap: 10px;
}

.m-cta-actions .m-btn {
  flex: 1;
}

/* Generic section wrapper used by home page content */
.m-section {
  padding: 0 14px 20px;
}

.m-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.m-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.1px;
}

.m-section-more {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

/* Horizontal scroll row */
.m-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.m-row::-webkit-scrollbar { display: none; }

/* Movie card in row */
.m-card {
  flex-shrink: 0;
  width: 120px;
  scroll-snap-align: start;
}

.m-card-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-surface);
  display: block;
  margin-bottom: 6px;
}

.m-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Badge overlay on poster */
.m-card-wrap {
  position: relative;
  display: block;
}

.m-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: #1a1100;
  letter-spacing: .3px;
}

.m-card-ep {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(0,0,0,.75);
  color: var(--text);
  backdrop-filter: blur(4px);
}

/* ── Bottom Navigation — Floating Pill ── */
.m-bottom-nav {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) scale(1) translateY(0px);
  z-index: 9999;
  transition: transform .38s cubic-bezier(.4,0,.2,1), opacity .38s ease;
  will-change: transform;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(20, 22, 32, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.06) inset;
  width: auto;
  min-width: 240px;
  max-width: calc(100vw - 32px);
}

.m-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  transition: color .2s, background .2s;
  padding: 7px 14px;
  border-radius: 999px;
  min-width: 60px;
}

.m-tab.is-active {
  color: var(--accent);
  background: rgba(245, 197, 24, .1);
}

.m-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2px;
  line-height: 1;
  white-space: nowrap;
}

/* Chỗ cho bottom nav nổi — padding trên main, không đẩy footer lơ lửng */
@media (max-width: 768px) {
  html {
    width: 100%;
    overflow-x: hidden;
  }

  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  main {
    padding-bottom: calc(80px + var(--safe-bottom));
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Skeleton loader */
.m-skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Country / Category Section Cards (matching ảnh mẫu) ── */

.m-country-section {
  padding: 20px 0 4px;
}

.m-country-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 12px;
}

.m-country-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1.1;
}

/* Màu title theo quốc gia / danh mục */
.m-country-title--kr  { color: #f5c518; }
.m-country-title--cn  { color: #f5724e; }
.m-country-title--us  { color: #e94560; }
.m-country-title--jp  { color: #4ea8f5; }
.m-country-title--new { color: #e0e0e0; }

.m-country-more {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.m-country-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 14px 12px;
}
.m-country-row::-webkit-scrollbar { display: none; }

/* Card phim (legacy country section — synced with m-movie-row) */
.m-country-section .m-movie-card {
  flex-shrink: 0;
  width: 132px;
  scroll-snap-align: start;
  display: block;
}

.m-movie-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-surface);
  margin-bottom: 8px;
}

/* Gradient scrim dưới poster */
.m-movie-poster-wrap::after {
  content: '';
  position: absolute;
  inset: 45% 0 0 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 100%);
  pointer-events: none;
}

.m-movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badges tập phim — góc dưới trái poster */
.m-movie-badges {
  position: absolute;
  bottom: 7px;
  left: 7px;
  right: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
}

.m-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.4;
  white-space: nowrap;
}

.m-badge--sub {
  background: rgba(20,20,35,.85);
  color: #cdd5ff;
  border: 1px solid rgba(130,150,255,.35);
}

.m-badge--dub {
  background: rgba(20,20,35,.85);
  color: #a8f0c6;
  border: 1px solid rgba(100,220,160,.35);
}

.m-badge--lt {
  background: rgba(20,20,35,.85);
  color: #ffd580;
  border: 1px solid rgba(245,197,24,.35);
}

.m-badge--complete {
  background: rgba(20,20,35,.85);
  color: #cdd5ff;
  border: 1px solid rgba(130,150,255,.35);
}

/* Quality pill — góc trên phải */
.m-movie-quality {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  background: rgba(245,197,24,.9);
  color: #1a1100;
  text-transform: uppercase;
}

/* Text info dưới card */
.m-movie-info { padding: 0 2px; }

.m-movie-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
}

.m-movie-origin {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-section-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 14px 0;
  opacity: .5;
}

/* ── Scrollbar global ── */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

/* ── Only apply mobile layout on <=768px ── */
@media (min-width: 769px) {
  .m-header,
  .m-drawer,
  .m-drawer-backdrop,
  .m-home-hero,
  .m-home-chips {
    display: none !important;
  }
  /* bottom nav ẩn riêng — không dùng display:none để tránh conflict với position:fixed */
  .m-bottom-nav {
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }
}

/* ============================================================
   FIX MOBILE — ngăn vùng đen giữa m-header và hero carousel

   Thứ tự DOM trong index.php:
     1. mobile_nav.php   → .m-header (sticky top:0, cao 54px)
     2. .navbar          → desktop nav (phải ẩn hoàn toàn)
     3. mobile_home_hero → .m-home-hero (render TRƯỚC .hero)
     4. section.hero     → desktop hero (margin-top:72px + height:100vh)
     5. main             → nội dung chính

   Vấn đề gốc:
     • .navbar position:fixed nên không chiếm layout,
       nhưng nếu không ẩn thì nó hiện đè lên .m-header
     • section.hero có margin-top:72px + min-height:520px →
       dù display:none vẫn có thể để lại khoảng trắng trong
       một số trường hợp; cần reset toàn bộ về 0
     • .m-home-hero không có padding-top → bị .m-header (54px)
       sticky che mất phần trên của carousel
   ============================================================ */
@media (max-width: 768px) {

  /* 1. Ẩn navbar desktop hoàn toàn */
  .navbar {
    display: none !important;
  }

  /* 2. Ẩn desktop hero — reset sạch height và margin */
  .hero,
  section.hero,
  #hero-slider {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  /* 3. Đẩy hero xuống đúng dưới header sticky */
  .m-home-hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body.page-movie .detail-hero.movie-hero {
    margin-top: 0 !important;
    padding-top: 8px !important;
  }

  body.page-movie .detail-hero.movie-hero .hero-content {
    padding-top: 10px !important;
  }

  body.page-movie .hero-meta {
    gap: 6px !important;
    row-gap: 6px !important;
  }

  body.page-movie .hero-meta span {
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 999px;
    white-space: nowrap;
  }

  body.page-movie .hero-badges {
    gap: 6px !important;
    margin-bottom: 12px !important;
  }

  body.page-movie .badge {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }

  body.page-movie .hero-desc {
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  /* ── Profile / Tài khoản Redesign ── */
  body.page-profile {
    background: #090b10 !important;
    overflow-x: hidden;
    width: 100%;
  }

  body.page-profile main.profile-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 10px 0 calc(92px + var(--safe-bottom)) !important;
    box-sizing: border-box;
    background: radial-gradient(circle at top, rgba(245, 197, 24, 0.08) 0%, transparent 60%);
  }

  body.page-profile .profile-container.container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  body.page-profile .profile-layout,
  body.page-profile .profile-sidebar,
  body.page-profile .profile-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .profile-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
  }

  .profile-hero-card {
    background: linear-gradient(135deg, rgba(24, 27, 35, 0.6) 0%, rgba(15, 17, 23, 0.8) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 24px !important;
    padding: 24px 20px !important;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 0 !important;
  }

  .profile-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(245, 197, 24, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  .profile-avatar-wrap {
    margin-bottom: 12px !important;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
  }

  .profile-avatar-wrap img,
  .profile-avatar-wrap > div {
    width: 84px !important;
    height: 84px !important;
    font-size: 32px !important;
    margin: 0 auto !important;
    border-radius: 50% !important;
    border: 3px solid #1f2330 !important;
    box-shadow: 
      0 0 0 2.5px var(--accent),
      0 8px 24px rgba(245, 197, 24, 0.3) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .profile-hero-meta {
    flex: none;
    z-index: 1;
    margin-bottom: 14px;
  }

  .profile-username {
    font-size: 19px !important;
    font-weight: 800 !important;
    margin-bottom: 4px !important;
    text-align: center !important;
    color: #ffffff !important;
  }

  .profile-email {
    font-size: 13px !important;
    color: var(--text-sub) !important;
    text-align: center !important;
    word-break: break-all;
    opacity: 0.85;
  }

  .profile-hero-card .profile-stats {
    z-index: 1;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    width: 100%;
    margin-top: 4px;
    padding: 16px 8px 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    gap: 12px;
  }

  .profile-stats > div > div:first-child {
    font-size: 19px !important;
    font-weight: 900 !important;
    color: var(--accent) !important;
    margin-bottom: 2px;
  }

  .profile-stats > div > div:last-child {
    font-size: 10px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-sub) !important;
  }

  .profile-info-card {
    display: none !important;
  }

  /* Sub-tab view toggle on mobile */
  .tab-subpage .profile-sidebar {
    display: none !important;
  }
  
  .tab-subpage .profile-main {
    display: block !important;
    width: 100% !important;
  }

  /* Sticky/Modern Back button */
  .profile-mobile-back {
    margin-bottom: 16px;
    width: 100%;
  }

  .btn-profile-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    background: rgba(245, 197, 24, 0.08);
    border: 1px solid rgba(245, 197, 24, 0.15);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
  }

  .btn-profile-back:active {
    background: rgba(245, 197, 24, 0.15);
    transform: scale(0.97);
  }

  /* iOS Style Premium Settings Menu List */
  .tab-overview .profile-nav {
    display: flex !important;
    flex-direction: column !important;
    background: rgba(24, 27, 35, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 24px !important;
    padding: 8px !important;
    gap: 0 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    margin-bottom: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }

  .tab-overview .profile-nav-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 14px 16px !important;
    border-radius: 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    transition: background 0.2s, transform 0.1s !important;
    width: 100%;
    box-sizing: border-box;
    scroll-snap-align: none !important;
  }

  .tab-overview .profile-nav-link:last-child {
    border-bottom: none !important;
  }

  .tab-overview .profile-nav-link:active {
    background: rgba(255, 255, 255, 0.04) !important;
    transform: scale(0.99);
  }

  .tab-overview .profile-nav-link::after {
    content: '›';
    margin-left: auto;
    font-size: 22px;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1;
  }

  .tab-overview .profile-nav-icon {
    font-size: 16px !important;
    margin-right: 12px !important;
    line-height: 1;
  }

  /* Specific Logout link in vertical list */
  .tab-overview .profile-nav-link.profile-nav-logout {
    color: #ff4d4d !important;
    background: transparent !important;
    border-bottom: none !important;
  }
  
  .tab-overview .profile-nav-link.profile-nav-logout::after {
    content: '';
  }

  .profile-main {
    overflow: hidden;
  }

  .profile-main > div {
    background: rgba(24, 27, 35, 0.5) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 24px !important;
    padding: 16px 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .profile-poster-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100%;
  }

  .profile-poster-grid a {
    min-width: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 6px;
    display: block;
    transition: transform 0.2s;
  }
  
  .profile-poster-grid a:active {
    transform: scale(0.97);
  }

  .profile-poster-grid img {
    border-radius: 12px !important;
  }

  .profile-poster-grid p {
    font-size: 11px !important;
    font-weight: 600 !important;
    margin: 6px 4px 2px !important;
    color: #f0f0f0 !important;
  }

  .profile-main .movies-grid.grid-6 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100%;
  }

  .profile-main h2 {
    font-size: 15px !important;
    font-weight: 800 !important;
    margin-bottom: 14px !important;
    color: #ffffff;
  }

  .profile-main a[style*="display:flex;gap:14px"] {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    padding: 10px !important;
    border-radius: 16px !important;
    gap: 10px !important;
    margin-bottom: 8px;
    align-items: center;
  }

  .profile-main a[style*="display:flex;gap:14px"] img {
    width: 50px !important;
    height: 70px !important;
    border-radius: 10px !important;
  }

  .profile-main a[style*="display:flex;gap:14px"] [style*="font-size:15px"] {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
  }

  .profile-main [style*="justify-content:space-between"][style*="align-items:flex-start"] {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }

  .profile-main form[style*="max-width"] {
    max-width: 100% !important;
  }

  .profile-main form input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
  }

  .profile-main form input:focus {
    border-color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }

  .profile-main form button {
    width: 100% !important;
    height: 46px !important;
    border-radius: 23px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    background: var(--accent) !important;
    color: #1a1100 !important;
    box-shadow: 0 4px 16px rgba(245, 197, 24, 0.2) !important;
  }

  body.page-profile footer {
    display: none !important;
  }
}

@media (max-width: 390px) {
  .profile-nav-link {
    padding: 7px 8px;
    font-size: 9px;
  }

  .profile-nav-icon {
    font-size: 14px;
  }
}

/* ── AUTH PAGES — Mobile Optimization ── */
@media (max-width: 768px) {
  /* Hide desktop blur effects on mobile for better performance */
  .auth-page::before,
  .auth-page::after {
    display: none;
  }

  main.auth-page {
    padding: 8px 16px 32px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }

  .auth-wrap {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
  }

  .auth-card {
    width: 100%;
    padding: 24px 20px;
    border-radius: 12px;
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(232, 197, 71, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  }

  .auth-card::before {
    height: 2px;
  }

  .auth-back {
    font-size: 12px;
    margin-bottom: 8px;
    gap: 4px;
  }

  .auth-back svg {
    width: 14px;
    height: 14px;
  }

  .auth-brand {
    margin-bottom: 12px;
  }

  .auth-brand-logo {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .auth-brand-tag {
    font-size: 9px;
    padding: 3px 8px;
    margin-left: 6px;
  }

  .auth-title {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .auth-subtitle {
    font-size: 12px;
    margin-bottom: 14px;
    line-height: 1.5;
  }

  .auth-alert {
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
  }

  .auth-alert svg {
    width: 16px;
    height: 16px;
  }

  .auth-field {
    margin-bottom: 12px;
  }

  .auth-label {
    font-size: 11px;
    margin-bottom: 5px;
  }

  .auth-input {
    padding: 10px 12px;
    font-size: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 44px;
  }

  .auth-input:focus {
    box-shadow: 0 0 0 2px rgba(232, 197, 71, 0.2);
  }

  .auth-submit {
    width: 100%;
    padding: 11px 12px;
    font-size: 13px;
    margin-top: 2px;
    border-radius: 8px;
    min-height: 44px;
  }

  .auth-divider {
    gap: 10px;
    margin: 12px 0;
    font-size: 10px;
  }

  .auth-footer {
    margin-top: 10px;
    font-size: 12px;
  }

  .auth-footer a {
    font-weight: 600;
  }

  /* Form layout optimization */
  form[id="login-form"],
  form[method="post"] {
    width: 100%;
  }
}

@media (max-width: 480px) {
  main.auth-page {
    padding: 6px 12px 24px;
  }

  .auth-card {
    padding: 20px 14px;
  }

  .auth-brand-logo {
    font-size: 20px;
  }

  .auth-title {
    font-size: 18px;
  }

  .auth-subtitle {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .auth-input {
    padding: 9px 11px;
    font-size: 16px;
    min-height: 42px;
  }

  .auth-field {
    margin-bottom: 10px;
  }

  .auth-submit {
    padding: 10px 11px;
    font-size: 12px;
    min-height: 42px;
  }

  .auth-label {
    font-size: 10px;
  }

  .auth-back {
    margin-bottom: 6px;
  }

  .auth-brand {
    margin-bottom: 10px;
  }
}

@media (max-width: 360px) {
  main.auth-page {
    padding: 4px 10px 20px;
  }

  .auth-card {
    padding: 18px 12px;
  }

  .auth-brand-logo {
    font-size: 18px;
  }

  .auth-title {
    font-size: 16px;
  }

  .auth-subtitle {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .auth-input {
    padding: 8px 10px;
    min-height: 40px;
  }

  .auth-submit {
    padding: 9px 10px;
    min-height: 40px;
  }

  .auth-divider {
    margin: 10px 0;
  }

  .auth-footer {
    margin-top: 8px;
  }
}

/* ── Chặn auto-zoom khi focus input trên iOS Safari ── */
/* iOS zoom khi font-size input < 16px — fix toàn bộ */
@media (max-width: 768px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* ── SEARCH PAGE MOBILE ── */
@media (max-width: 768px) {
  /* Override padding:100px cứng của tim-kiem.php — mobile header thấp hơn desktop */
  main[style*="padding:100px"] {
    padding-top: calc(var(--header-h) + 16px) !important;
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px) !important;
    min-height: calc(100dvh - var(--header-h) - var(--nav-h) - var(--safe-bottom));
  }

  #search-input {
    font-size: 16px !important;
  }

  .movies-grid,
  .movies-grid.grid-6 {
    gap: 8px;
  }

  .movie-card {
    border-radius: 8px;
  }

  .movie-title {
    font-size: 13px !important;
    line-height: 1.3;
  }

  .movie-meta {
    font-size: 11px !important;
  }
}

@media (max-width: 480px) {
  .search-input-large {
    max-width: 100%;
  }

  .search-input-large input {
    padding: 12px 16px;
  }

  .search-input-large button {
    padding: 12px 16px;
  }

  .movie-card {
    border: none;
    box-shadow: none;
    border-radius: 6px;
  }

  .movie-card:hover {
    transform: none;
    box-shadow: none;
  }

  .movie-title {
    font-size: 12px !important;
  }
}

/* ── Bottom Nav Scroll Shrink Effect ── */
/* Kéo xuống: thu nhỏ + mờ nhẹ, giữ translateX(-50%) để nav không lệch */
.m-bottom-nav.is-shrunk {
  transform: translateX(-50%) scale(0.78) translateY(8px);
  opacity: 0.6;
}


/* ── Ẩn footer trên mobile ── */
@media (max-width: 768px) {
  footer {
    display: none !important;
  }
}


/* ── Bottom Nav Avatar + Online Dot ── */
.m-tab-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.m-tab-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  display: block;
}

.m-tab-avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--accent);
}

/* Tab account active: viền sáng hơn */
.m-tab.is-active .m-tab-avatar {
  border-color: #fff;
}
.m-tab.is-active .m-tab-avatar-fallback {
  border-color: #fff;
  color: #fff;
}

/* Online dot — xanh lá nhấp nháy */
.m-tab-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg, #0d0f14);
  animation: online-pulse 2.2s ease-in-out infinite;
}

@keyframes online-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  50%       { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

/* Fix iOS Safari input auto-zoom: Force input font-size >= 16px on mobile view */
@media (max-width: 768px) {
  input, select, textarea,
  input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="tel"] {
    font-size: 16px !important;
  }
}