/* ============================================
   FAR GAMES — Components
   Neo-brutalist + motherduck aesthetic
   ============================================ */

/* ---- Page Loader ---- */
.page-loader {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-primary);
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.page-loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.page-loader__logo { width: 72px; height: 72px; border-radius: 50%; margin-bottom: var(--space-4); }
.page-loader__brand {
  font-family: var(--font-display); font-size: var(--text-2xl);
  color: var(--text-primary); margin-bottom: var(--space-4);
}
.page-loader__bar {
  width: 120px; height: 4px; background: var(--border-color);
  border-radius: var(--radius-full); overflow: hidden;
}
.page-loader__bar-fill {
  width: 0%; height: 100%; background: var(--accent);
  border-radius: var(--radius-full);
  animation: loader-fill 1.8s var(--ease) forwards;
}
@keyframes loader-fill { to { width: 100%; } }

/* ---- Scroll Progress ---- */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 0%; height: 3px;
  background: var(--accent); z-index: 10001; transition: width 0.05s linear;
}

/* ---- Stinger Overlay ---- */
.stinger-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; background: var(--twilight-indigo);
}
.stinger-overlay.active { pointer-events: all; opacity: 1; }
.stinger-overlay video { width: 100%; height: 100%; object-fit: cover; }

/* ---- Navbar ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary);
  border-bottom: 1.5px solid var(--border-color);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.navbar.scrolled {
  background: var(--bg-primary);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  border-bottom-color: transparent;
}
[data-theme="dark"] .navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.2); }
.navbar__inner {
  width: 100%; max-width: var(--container-max); padding: 0 var(--space-6);
  display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.navbar__logo {
  display: flex; align-items: center; gap: 10px;
  z-index: 1001; text-decoration: none;
}
.navbar__logo-img {
  height: 34px; width: 34px; border-radius: 50%;
  border: 1.5px solid var(--border-color);
}
.navbar__logo-text {
  font-family: var(--font-body); font-size: var(--text-base);
  color: var(--text-primary); font-weight: 800;
  letter-spacing: 0.04em;
}

/* Nav Links */
.navbar__links { display: flex; align-items: center; gap: 2px; list-style: none; }
.navbar__link {
  font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary);
  padding: 7px 16px; border-radius: var(--radius-full);
  transition: all var(--dur-fast) var(--ease); position: relative;
}
.navbar__link:hover { color: var(--text-primary); background: rgba(var(--twilight-indigo-rgb), 0.04); }
[data-theme="dark"] .navbar__link:hover { background: rgba(var(--eggshell-rgb), 0.05); }
.navbar__link.active {
  color: var(--text-primary); font-weight: 600;
  background: rgba(var(--twilight-indigo-rgb), 0.06);
}
[data-theme="dark"] .navbar__link.active { background: rgba(var(--eggshell-rgb), 0.08); }

/* Nav Actions */
.navbar__actions { display: flex; align-items: center; gap: var(--space-3); }

/* Theme Toggle — Pill */
.theme-toggle {
  width: 48px; height: 36px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  position: relative; cursor: pointer; padding: 0;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--twilight-indigo);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(12px);
  background: var(--accent-warm);
}
.theme-toggle__thumb svg { width: 14px; height: 14px; }
.theme-toggle__thumb svg .sun-icon { display: none; }
.theme-toggle__thumb svg .moon-icon { display: block; }
[data-theme="dark"] .theme-toggle__thumb svg .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle__thumb svg .moon-icon { display: none; }

/* Lang Toggle */
.lang-toggle {
  font-size: var(--text-xs); font-weight: 700;
  height: 36px; padding: 0 16px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary); background: var(--bg-card);
  cursor: pointer; letter-spacing: 0.04em;
  transition: all var(--dur-fast) var(--ease);
  display: inline-flex; align-items: center; justify-content: center;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.feedback-toggle {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.feedback-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.feedback-toggle svg { width: 17px; height: 17px; }

/* Palette Picker */
.palette-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.palette-toggle {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast) var(--ease);
  color: var(--text-primary);
  flex-shrink: 0;
}
.palette-toggle:hover { border-color: var(--accent); color: var(--accent); }
.palette-picker__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease), visibility var(--dur-fast);
  z-index: 1010;
}
.palette-picker__dropdown.open { opacity: 1; visibility: visible; }
.palette-picker__dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer; transition: all var(--dur-fast) var(--ease);
  position: relative;
}
.palette-picker__dot:hover { transform: scale(1.15); }
.palette-picker__dot.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3.5px var(--text-primary);
}
.palette-picker__dot--default {
  background: conic-gradient(#e07a5f 0deg, #f2cc8f 90deg, #81b29a 180deg, #3d405b 270deg, #e07a5f 360deg);
}
.palette-picker__dot--rose {
  background: conic-gradient(#d63e6c 0deg, #a880bf 90deg, #3d85d4 180deg, #ffc8dd 270deg, #d63e6c 360deg);
}
.palette-picker__dot--ocean {
  background: conic-gradient(#c62b38 0deg, #8db87a 90deg, #3a8a8d 180deg, #1d3557 270deg, #c62b38 360deg);
}

/* Auth Buttons */
.auth-btn {
  font-size: var(--text-sm); font-weight: 600;
  height: 36px; padding: 0 20px; border-radius: var(--radius-full);
  transition: all var(--dur) var(--ease); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
}
.auth-btn--in {
  color: var(--text-primary); background: transparent;
  border: 1.5px solid var(--border-color);
}
.auth-btn--in:hover { border-color: var(--accent); color: var(--accent); }
.auth-btn--up {
  color: #fff; background: var(--accent); border: 1.5px solid var(--accent);
}
.auth-btn--up:hover {
  background: #d16a50; border-color: #d16a50;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--burnt-peach-rgb), 0.3);
}

.feedback-modal {
  position: fixed; inset: 0; z-index: 1100;
  display: grid; place-items: center;
  padding: var(--space-6);
  background: rgba(19, 22, 42, 0.44);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.feedback-modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.feedback-modal__panel {
  width: min(100%, 680px);
  background: linear-gradient(180deg, rgba(var(--eggshell-rgb), 0.97), rgba(var(--eggshell-rgb), 0.93));
  color: var(--twilight-indigo);
  border: 2px solid var(--twilight-indigo);
  border-radius: calc(var(--radius-xl) + 4px);
  box-shadow: 8px 8px 0 rgba(var(--twilight-indigo-rgb), 0.95);
  padding: var(--space-10);
}
[data-theme="dark"] .feedback-modal__panel {
  background: linear-gradient(180deg, rgba(247, 239, 224, 0.97), rgba(239, 229, 212, 0.94));
}
.feedback-modal__header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-6);
}
.feedback-modal__title {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.2; margin: 0;
}
.feedback-modal__desc {
  margin: var(--space-3) 0 0;
  color: rgba(var(--twilight-indigo-rgb), 0.78);
  font-size: var(--text-base);
  line-height: 1.8;
}
.feedback-modal__close {
  min-width: 44px; height: 44px; border-radius: 16px;
  border: 2px solid var(--twilight-indigo);
  background: rgba(156, 181, 199, 0.9);
  color: var(--twilight-indigo);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.feedback-modal__close:hover { transform: translateY(-1px); background: rgba(156, 181, 199, 1); }
.feedback-modal__close svg { width: 18px; height: 18px; }
.feedback-modal__options { display: grid; gap: var(--space-5); }
.feedback-option {
  display: block; text-decoration: none; color: inherit;
  background: rgba(255, 226, 170, 0.52);
  border: 2px solid var(--twilight-indigo);
  border-radius: 28px;
  padding: var(--space-6);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.feedback-option:hover { transform: translateY(-2px); box-shadow: 6px 6px 0 rgba(var(--twilight-indigo-rgb), 0.9); }
.feedback-option--secondary { background: rgba(237, 202, 196, 0.64); }
.feedback-option--neutral { background: rgba(225, 231, 239, 0.74); }
.feedback-option__title {
  display: flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 1.8vw, 1.8rem);
  font-weight: 800; margin-bottom: var(--space-2);
}
.feedback-option__icon {
  width: 42px; height: 42px; border-radius: 14px;
  border: 2px solid var(--twilight-indigo);
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.58);
}
.feedback-option__icon svg { width: 18px; height: 18px; }
.feedback-option__desc {
  margin: 0; color: rgba(var(--twilight-indigo-rgb), 0.8);
  font-size: var(--text-base); line-height: 1.8;
}
.feedback-copy--ar { display: none; }
html[lang="ar"] .feedback-copy--ar { display: inline; }
html[lang="ar"] .feedback-copy--en { display: none; }
html[lang="en"] .feedback-copy--ar { display: none; }
html[lang="en"] .feedback-copy--en { display: inline; }

/* Mobile Toggle */
.navbar__mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; z-index: 1001;
}
.navbar__mobile-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: var(--radius-full);
  transition: all var(--dur) var(--ease); transform-origin: center;
}
.navbar__mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar__mobile-toggle.active span:nth-child(2) { opacity: 0; }
.navbar__mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.navbar__mobile-menu {
  display: none; position: fixed; inset: 0;
  background: var(--bg-primary); z-index: 999;
  flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-6); opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.navbar__mobile-menu.open { opacity: 1; visibility: visible; }
.navbar__mobile-menu .navbar__link {
  font-size: var(--text-xl); font-family: var(--font-display); padding: var(--space-3) var(--space-6);
}
.navbar__mobile-menu .navbar__actions { margin-top: var(--space-8); gap: var(--space-3); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-full);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--dur) var(--ease); text-decoration: none; line-height: 1;
}
.btn--primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn--primary:hover {
  background: #d16a50; border-color: #d16a50;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--burnt-peach-rgb), 0.3);
}
.btn--outline {
  background: transparent; color: var(--text-primary);
  border-color: var(--border-strong);
}
[data-theme="dark"] .btn--outline { border-color: rgba(var(--eggshell-rgb), 0.2); }
.btn--outline:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-2px);
}
.btn--neo {
  background: var(--bg-card); color: var(--text-primary);
  border: 2px solid var(--text-primary);
  box-shadow: 4px 4px 0px var(--text-primary);
}
[data-theme="dark"] .btn--neo {
  border-color: var(--eggshell);
  box-shadow: 4px 4px 0px rgba(var(--eggshell-rgb), 0.2);
}
.btn--neo:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--text-primary);
}
.btn--lg { padding: 16px 36px; font-size: var(--text-base); }

/* ---- Hero ---- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding-top: var(--nav-height);
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(var(--burnt-peach-rgb), 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(var(--muted-teal-rgb), 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 90%, rgba(var(--apricot-cream-rgb), 0.05) 0%, transparent 40%);
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-16); align-items: center;
  padding: var(--space-16) 0;
}
.hero__content { max-width: 540px; }
.hero__label { margin-bottom: var(--space-6); }
.hero__title { margin-bottom: var(--space-6); }
.hero__title-accent {
  color: var(--accent);
  font-style: italic;
}
.hero__desc {
  font-size: var(--text-lg); color: var(--text-secondary);
  line-height: 1.7; margin-bottom: var(--space-8);
}
.hero__cta { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.hero__visual {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.hero__mascot {
  width: 340px; height: 340px; border-radius: 50%;
  border: 3px solid var(--text-primary);
  box-shadow: 8px 8px 0px var(--text-primary);
  object-fit: contain;
  background: var(--bg-card);
  padding: 20px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
[data-theme="dark"] .hero__mascot {
  border-color: rgba(var(--eggshell-rgb), 0.2);
  box-shadow: 8px 8px 0px rgba(var(--burnt-peach-rgb), 0.25);
}
.hero__mascot:hover {
  transform: translate(-3px, -3px);
  box-shadow: 11px 11px 0px var(--text-primary);
}
[data-theme="dark"] .hero__mascot:hover {
  box-shadow: 11px 11px 0px rgba(var(--burnt-peach-rgb), 0.35);
}
.hero__float-badge {
  position: absolute; padding: 10px 18px;
  border: 2px solid var(--text-primary);
  border-radius: var(--radius-md);
  background: var(--bg-card); font-size: var(--text-sm); font-weight: 700;
  box-shadow: 3px 3px 0px var(--text-primary);
  white-space: nowrap;
}
[data-theme="dark"] .hero__float-badge {
  border-color: rgba(var(--eggshell-rgb), 0.2);
  box-shadow: 3px 3px 0px rgba(var(--eggshell-rgb), 0.1);
}
.hero__float-badge--1 { top: 10%; right: -10%; transform: rotate(3deg); }
.hero__float-badge--2 { bottom: 15%; left: -5%; transform: rotate(-2deg); }
.hero__float-badge--3 { top: 55%; right: -15%; transform: rotate(-4deg); }

/* Scroll Indicator */
.hero__scroll {
  position: absolute; bottom: var(--space-8); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-tertiary); font-size: var(--text-xs);
}
.hero__scroll-line {
  width: 1px; height: 40px; background: var(--border-color);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 100%; height: 50%; background: var(--accent);
  animation: scroll-line 2s var(--ease) infinite;
}
@keyframes scroll-line {
  0% { top: -50%; } 100% { top: 150%; }
}

/* ---- Game Info Card Mascot ---- */
.game-info__card-mascot {
  width: 44px; height: 44px; object-fit: contain;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-lg);
  mix-blend-mode: multiply;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
[data-theme="dark"] .game-info__card-mascot {
  mix-blend-mode: normal;
  background: var(--bg-card);
  padding: 3px;
  box-shadow: none;
}

/* ---- Game Hero Mascot ---- */
.game-hero__mascot-img {
  width: 80%; max-width: 190px; object-fit: contain;
  transition: transform var(--dur) var(--ease);
  border-radius: var(--radius-xl);
  mix-blend-mode: multiply;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
[data-theme="dark"] .game-hero__mascot-img {
  mix-blend-mode: normal;
  background: var(--bg-card);
  padding: 8px;
  box-shadow: none;
}
.game-hero__icon-wrap:hover .game-hero__mascot-img { transform: scale(1.06) rotate(-3deg); }

/* ---- Marquee ---- */
.marquee {
  padding: var(--space-6) 0; overflow: hidden;
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-secondary);
}
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 35s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: flex; align-items: center; gap: var(--space-6);
  padding: 0 var(--space-8); white-space: nowrap;
  font-family: var(--font-display); font-size: var(--text-2xl);
  color: var(--text-tertiary);
}
.marquee__dot { color: var(--accent); font-size: var(--text-sm); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }

/* ---- Section Header ---- */
.section-header { text-align: center; max-width: 560px; margin: 0 auto var(--space-16); }
.section-header__title { margin-bottom: var(--space-4); margin-top: var(--space-4); }
.section-header__desc { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.7; }

/* ---- Game Cards (Neo-Brutalist) ---- */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }

.game-card {
  position: relative; background: var(--bg-card);
  border: 2px solid var(--text-primary);
  border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all var(--dur) var(--ease);
  text-decoration: none; color: inherit; display: block;
}
[data-theme="dark"] .game-card { border-color: rgba(var(--eggshell-rgb), 0.15); }
.game-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-card-hover);
}
.game-card__visual {
  width: 100%; aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.game-card__visual-icon { font-size: 3.5rem; position: relative; z-index: 1; }
.game-card__visual-mascot {
  width: 65%; max-height: 85%; object-fit: contain;
  position: relative; z-index: 1;
  transition: transform var(--dur) var(--ease);
  border-radius: var(--radius-xl);
  mix-blend-mode: multiply;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
[data-theme="dark"] .game-card__visual-mascot {
  mix-blend-mode: normal;
  background: var(--bg-card);
  padding: 8px;
  box-shadow: none;
}
.game-card:hover .game-card__visual-mascot { transform: scale(1.06) rotate(-2deg); }
.game-card__tag {
  position: absolute; top: var(--space-3); right: var(--space-3);
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 700; color: #fff; z-index: 2;
}
[dir="rtl"] .game-card__tag { right: auto; left: var(--space-3); }
.game-card__tag--photo { background: var(--game-photo); }
.game-card__tag--cells { background: var(--game-cells); }
.game-card__tag--feud { background: var(--game-feud); color: var(--twilight-indigo); }

.game-card__body { padding: var(--space-6); border-top: 2px solid var(--border-color); }
.game-card__name {
  font-family: var(--font-display); font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}
.game-card__desc {
  font-size: var(--text-sm); color: var(--text-secondary);
  line-height: 1.6; margin-bottom: var(--space-5);
}
.game-card__footer { display: flex; align-items: center; justify-content: space-between; }
.game-card__price {
  font-family: var(--font-display); font-size: var(--text-lg); color: var(--accent);
}
.game-card__price-label {
  font-size: var(--text-xs); color: var(--text-tertiary);
  font-family: var(--font-body); font-weight: 400;
}
/* Free price tag (crossed-out old price + "Free" label) */
.game-card__price--free { display: flex; align-items: center; gap: var(--space-2); }
.game-card__old-price {
  font-family: var(--font-body); font-size: var(--text-sm); color: var(--text-tertiary);
  text-decoration: line-through; text-decoration-thickness: 2px;
  text-decoration-color: rgba(var(--burnt-peach-rgb), 0.6);
}
.game-card__free-tag {
  font-family: var(--font-display); font-size: var(--text-lg);
  color: var(--muted-teal); font-weight: 700;
}
.game-card__price--soon {
  font-family: var(--font-display); font-size: var(--text-base);
  color: var(--burnt-peach); opacity: 0.85;
}
.game-card__arrow {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-primary);
  transition: all var(--dur) var(--ease);
}
[data-theme="dark"] .game-card__arrow { border-color: rgba(var(--eggshell-rgb), 0.2); }
.game-card:hover .game-card__arrow {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ---- Pricing Cards (Neo-Brutalist) ---- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8); max-width: 780px; margin: 0 auto;
}
.pricing-grid--3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1080px;
}
.pricing-card {
  position: relative; background: var(--bg-card);
  border: 2px solid var(--text-primary);
  border-radius: var(--radius-lg); padding: var(--space-8);
  box-shadow: var(--shadow-card);
  transition: all var(--dur) var(--ease);
}
[data-theme="dark"] .pricing-card { border-color: rgba(var(--eggshell-rgb), 0.15); }
.pricing-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-card-hover);
}
.pricing-card--rotate-left { transform: rotate(-1deg); }
.pricing-card--rotate-left:hover { transform: rotate(-1deg) translate(-3px, -3px); }
.pricing-card--rotate-right { transform: rotate(1deg); }
.pricing-card--rotate-right:hover { transform: rotate(1deg) translate(-3px, -3px); }
.pricing-card--featured {
  border-color: var(--accent);
  box-shadow: 5px 5px 0px var(--accent);
}
.pricing-card--featured:hover { box-shadow: 7px 7px 0px var(--accent); }

.pricing-card__popular {
  position: absolute; top: -14px; right: var(--space-6);
  padding: 6px 16px; border-radius: var(--radius-full);
  background: var(--accent); color: #fff;
  font-size: var(--text-xs); font-weight: 700;
  border: 2px solid var(--text-primary);
  transform: rotate(2deg);
}
[dir="rtl"] .pricing-card__popular { right: auto; left: var(--space-6); }
.pricing-card__icon { font-size: 2rem; margin-bottom: var(--space-4); }
.pricing-card__mascot {
  width: 72px; height: 72px; object-fit: contain;
  margin-bottom: var(--space-4);
  transition: transform var(--dur) var(--ease);
  border-radius: var(--radius-xl);
  mix-blend-mode: multiply;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
[data-theme="dark"] .pricing-card__mascot {
  mix-blend-mode: normal;
  background: var(--bg-card);
  padding: 4px;
  box-shadow: none;
}
.pricing-card:hover .pricing-card__mascot { transform: scale(1.08) rotate(3deg); }
.pricing-card__name {
  font-family: var(--font-display); font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}
.pricing-card__desc {
  font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-6);
}
.pricing-card__price {
  font-family: var(--font-display); font-size: var(--text-3xl);
  color: var(--text-primary); margin-bottom: var(--space-1);
}
.pricing-card__price-sub {
  font-size: var(--text-sm); color: var(--text-tertiary);
  font-family: var(--font-body);
}
/* Free pricing card styles */
.pricing-card__price--free {
  display: flex; align-items: baseline; gap: var(--space-3);
  flex-wrap: wrap; justify-content: center;
}
.pricing-card__old-price {
  font-family: var(--font-body); font-size: var(--text-base); color: var(--text-tertiary);
  text-decoration: line-through; text-decoration-thickness: 2px;
  text-decoration-color: rgba(var(--burnt-peach-rgb), 0.6);
}
.pricing-card__free-tag {
  font-family: var(--font-display); font-size: var(--text-3xl);
  color: var(--muted-teal); font-weight: 700;
}
.pricing-card--featured .pricing-card__free-tag { color: var(--burnt-peach); }
.pricing-card__save {
  position: absolute; top: -14px; left: var(--space-6);
  display: inline-block; padding: 6px 14px; border-radius: var(--radius-full);
  background: var(--accent-secondary); color: #fff;
  font-size: var(--text-xs); font-weight: 700;
  border: 2px solid var(--text-primary);
  transform: rotate(-2deg);
  z-index: 1;
}
[dir="rtl"] .pricing-card__save { left: auto; right: var(--space-6); }
.pricing-card__badge {
  position: absolute; top: -14px; right: var(--space-6);
  padding: 6px 16px; border-radius: var(--radius-full);
  background: var(--accent-warm); color: var(--text-primary);
  font-size: var(--text-xs); font-weight: 700;
  border: 2px solid var(--text-primary);
  transform: rotate(2deg);
}
[dir="rtl"] .pricing-card__badge { right: auto; left: var(--space-6); }
.pricing-card__price-currency {
  font-family: var(--font-body); font-size: var(--text-base);
  color: var(--text-tertiary); margin-inline-start: var(--space-1);
}
.pricing-card__features {
  list-style: none; margin-bottom: var(--space-8);
}
.pricing-card__features li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: var(--text-sm); color: var(--text-secondary);
}
.pricing-card__features li + li { border-top: 1px solid var(--border-color); }
.pricing-card__check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800;
}
.pricing-card__check--teal { background: rgba(var(--muted-teal-rgb), 0.12); color: var(--accent-secondary); }
.pricing-card__check--peach { background: rgba(var(--burnt-peach-rgb), 0.12); color: var(--accent); }

/* ---- Features ---- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.feature-card {
  padding: var(--space-6); border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  transition: all var(--dur) var(--ease);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature-card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: var(--space-4);
  border: 2px solid var(--border-color);
}
.feature-card__mascot {
  width: 56px; height: 56px; object-fit: contain;
  margin-bottom: var(--space-4);
  transition: transform var(--dur) var(--ease);
  border-radius: var(--radius-xl);
  mix-blend-mode: multiply;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
[data-theme="dark"] .feature-card__mascot {
  mix-blend-mode: normal;
  background: var(--bg-card);
  padding: 4px;
  box-shadow: none;
}
.feature-card:hover .feature-card__mascot { transform: scale(1.1) rotate(-3deg); }
.feature-card__title {
  font-family: var(--font-body); font-size: var(--text-base);
  font-weight: 700; margin-bottom: var(--space-2);
}
.feature-card__desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--twilight-indigo); position: relative; overflow: hidden;
  border-top: 2px solid rgba(var(--eggshell-rgb), 0.1);
}
[data-theme="dark"] .cta-banner { background: var(--bg-secondary); }
.cta-banner__inner {
  text-align: center; max-width: 600px; margin: 0 auto;
  position: relative; z-index: 1;
}
.cta-banner__mascot {
  width: 110px; height: 110px; object-fit: contain;
  margin-bottom: var(--space-6);
  animation: mascot-float 3s ease-in-out infinite;
  border-radius: var(--radius-xl);
  background: rgba(var(--eggshell-rgb), 0.92);
  padding: 10px;
  border: 2px solid rgba(var(--eggshell-rgb), 0.25);
  box-shadow: 0 6px 24px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
}
[data-theme="dark"] .cta-banner__mascot {
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: none;
}
@keyframes mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.cta-banner h2 { color: var(--eggshell); margin-bottom: var(--space-4); }
.cta-banner p {
  color: rgba(var(--eggshell-rgb), 0.65); font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}
.cta-banner .btn--primary { background: var(--accent); border-color: var(--accent); }

/* ---- Footer ---- */
.footer {
  background: var(--bg-footer); color: var(--eggshell);
  padding: var(--space-20) 0 var(--space-8);
  border-top: 2px solid rgba(var(--eggshell-rgb), 0.08);
}
[data-theme="dark"] .footer { background: var(--bg-footer); }
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10); margin-bottom: var(--space-12);
}
.footer__brand-desc {
  font-size: var(--text-sm); color: rgba(var(--eggshell-rgb), 0.55);
  line-height: 1.7; margin-top: var(--space-4); max-width: 260px;
}
.footer__location {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(var(--eggshell-rgb), 0.7);
  line-height: 1.7;
  margin-top: var(--space-3);
  max-width: 260px;
}
.footer__location svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--accent-warm);
}
.footer__location-text--ar { display: none; }
html[lang="ar"] .footer__location-text--ar { display: inline; }
html[lang="ar"] .footer__location-text--en { display: none; }
html[lang="en"] .footer__location-text--ar { display: none; }
html[lang="en"] .footer__location-text--en { display: inline; }
.footer__heading {
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent-warm); margin-bottom: var(--space-5);
}
.footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__links a {
  font-size: var(--text-sm); color: rgba(var(--eggshell-rgb), 0.55);
  transition: color var(--dur-fast) var(--ease);
}
.footer__links a:hover { color: var(--accent); }
.footer__socials { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.footer__social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(var(--eggshell-rgb), 0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(var(--eggshell-rgb), 0.55); font-size: 0.85rem;
  transition: all var(--dur) var(--ease);
}
.footer__social-icon:hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
  transform: translateY(-2px);
}
.footer__bottom {
  border-top: 1px solid rgba(var(--eggshell-rgb), 0.08);
  padding-top: var(--space-6);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4);
}
.footer__copyright { font-size: var(--text-xs); color: rgba(var(--eggshell-rgb), 0.35); }
.footer__bottom-links { display: flex; gap: var(--space-5); list-style: none; }
.footer__bottom-links a { font-size: var(--text-xs); color: rgba(var(--eggshell-rgb), 0.35); }
.footer__bottom-links a:hover { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; gap: var(--space-10); }
  .hero__content { max-width: 100%; margin: 0 auto; }
  .hero__cta { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__mascot { width: 240px; height: 240px; }
  .hero__float-badge { display: none; }
  .games-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid--3 { grid-template-columns: repeat(3, 1fr); max-width: 900px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar__links { display: none; }
  .auth-btn { display: none; }
  .navbar__mobile-toggle { display: flex; }
  .navbar__mobile-menu { display: flex; }
  .navbar__mobile-menu .auth-btn { display: inline-flex; }
  .navbar__mobile-menu .palette-picker__dropdown { top: auto; bottom: calc(100% + 8px); }
  .navbar__actions { gap: var(--space-2); }
  .palette-toggle, .theme-toggle, .lang-toggle, .feedback-toggle { height: 34px; }
  .palette-toggle { width: 34px; }
  .theme-toggle { width: 44px; }
  .feedback-toggle { width: 34px; }
  .palette-picker__dropdown { padding: 6px 10px; }
  .palette-picker__dot { width: 24px; height: 24px; }
  .feedback-modal__panel { padding: var(--space-7); border-radius: 28px; }
  .feedback-option { border-radius: 24px; padding: var(--space-5); }

  .games-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .pricing-grid, .pricing-grid--3 { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .pricing-card--rotate-left,
  .pricing-card--rotate-right { transform: none; }
  .pricing-card--rotate-left:hover,
  .pricing-card--rotate-right:hover { transform: translate(-3px, -3px); }
  .features-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer__bottom { flex-direction: column; text-align: center; }

  /* Better touch targets across the board */
  .btn, .btn--primary, .btn--ghost { min-height: 44px; padding: var(--space-3) var(--space-6); }
  /* Game cards — full width, more breathing room */
  .game-card { padding: var(--space-5); }
  .game-card__title { font-size: var(--text-xl); }
}

@media (max-width: 480px) {
  :root { --nav-height: 60px; }
  .hero__scroll { display: none; }
  .hero__mascot { width: 180px; height: 180px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__title { margin-bottom: var(--space-3); }
  .hero__subtitle { font-size: var(--text-sm); margin-bottom: var(--space-4); }
  /* Tighter nav on small phones */
  .navbar__inner { padding: 0 var(--space-3); }
  .navbar__logo-text { font-size: var(--text-sm); }
  .lang-toggle { padding: 0 10px; font-size: 10px; }
  .feedback-modal { padding: var(--space-4); }
  .feedback-modal__header { margin-bottom: var(--space-5); }
  .feedback-modal__title { font-size: 1.8rem; }
  /* Section padding adjustments */
  section { padding: var(--space-10) 0; }
  .section-header { margin-bottom: var(--space-6); }
  .section-header__title { font-size: var(--text-2xl); }
}

/* ============================================
   Auth Modal — Clean Centered Design
   One consistent system: soft, minimal, premium.
   ============================================ */

/* Overlay */
.am {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.am--open { opacity: 1; visibility: visible; }

.am__backdrop {
  position: absolute; inset: 0;
  background: rgba(44, 46, 63, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Card */
.am__card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  margin: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(61,64,91,0.04),
    0 8px 40px rgba(61,64,91,0.10),
    0 24px 80px rgba(61,64,91,0.06);
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.am--open .am__card { transform: translateY(0) scale(1); }

[data-theme="dark"] .am__card {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 8px 40px rgba(0,0,0,0.3),
    0 24px 80px rgba(0,0,0,0.2);
}

/* Brand strip — mascot sits here */
.am__brand {
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6) var(--space-6) var(--space-3);
  background: radial-gradient(ellipse at center, rgba(var(--apricot-cream-rgb, 242,204,143), 0.15) 0%, transparent 70%);
  border-radius: 20px 20px 0 0;
}
.am__mascot {
  width: 72px; height: 72px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(61,64,91,0.10));
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1), opacity 0.18s ease;
  /* Blend away white edges from the PNG */
  mix-blend-mode: multiply;
}
[data-theme="dark"] .am__mascot {
  mix-blend-mode: normal;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.25));
}
.am__mascot--swap { opacity: 0; transform: scale(0.85); }
.am__card:hover .am__mascot:not(.am__mascot--swap) { transform: scale(1.06) rotate(-2deg); }

/* Close button */
.am__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 10px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-tertiary);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast) var(--ease);
}
[dir="rtl"] .am__close { right: auto; left: 16px; }
.am__close:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* Body */
.am__body {
  padding: 0 var(--space-8) var(--space-8);
}

/* Forms */
.am__form {
  display: flex; flex-direction: column; gap: 0;
}

/* Header */
.am__hdr { text-align: center; margin-bottom: var(--space-5); }
.am__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 700; color: var(--text-primary);
  line-height: 1.2; margin: 0;
}
.am__sub {
  font-size: var(--text-sm); color: var(--text-tertiary);
  margin-top: 6px; line-height: 1.5;
}

/* Fields container */
.am__fields {
  display: flex; flex-direction: column; gap: 0;
  margin-bottom: var(--space-4);
}

/* Label */
.am__label {
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  margin-top: 16px;
  letter-spacing: 0.01em;
}
.am__fields .am__label:first-child { margin-top: 0; }

/* Input wrapper */
.am__input-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.am__input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--burnt-peach-rgb), 0.08);
}

/* Input */
.am__input {
  flex: 1; min-width: 0;
  height: 46px; padding: 0 14px;
  font-size: var(--text-base); font-family: var(--font-body);
  color: var(--text-primary);
  background: transparent; border: none; outline: none;
  border-radius: 12px;
}
.am__input::placeholder { color: var(--text-tertiary); opacity: 0.7; }

/* Validation check */
.am__valid-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  margin-inline-end: 10px;
  border-radius: var(--radius-full);
  background: rgba(var(--muted-teal-rgb), 0.0);
  color: var(--muted-teal);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.4);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.am__valid-icon--on {
  opacity: 1; transform: scale(1);
  background: rgba(var(--muted-teal-rgb), 0.1);
}

/* Eye */
.am__eye {
  background: none; border: none; cursor: pointer; padding: 0;
  width: 36px; height: 36px;
  margin-inline-end: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); border-radius: 8px; flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease);
}
.am__eye:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* Password rules */
.am__rules {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.am__rules li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-tertiary);
  transition: color 0.25s var(--ease);
}
.am__rule-check {
  width: 18px; height: 18px; border-radius: var(--radius-full);
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s var(--ease);
}
.am__rule-check svg { opacity: 0; transition: opacity 0.2s; }
.am__rule--ok { color: var(--muted-teal); }
.am__rule--ok .am__rule-check {
  background: rgba(var(--muted-teal-rgb), 0.12);
  color: var(--muted-teal);
}
.am__rule--ok .am__rule-check svg { opacity: 1; }

/* Error */
.am__error {
  font-size: 13px; color: #e07a5f; font-weight: 500;
  min-height: 18px; text-align: center;
  margin-bottom: var(--space-1);
}

/* Submit button */
.am__btn {
  width: 100%; height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: var(--text-base); font-weight: 700; font-family: var(--font-body);
  color: #fff; background: var(--accent); border: none;
  border-radius: var(--radius-full); cursor: pointer;
  transition: all 0.25s var(--ease);
  letter-spacing: 0.01em;
}
.am__btn:hover {
  background: #d16a50;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(var(--burnt-peach-rgb), 0.25);
}
.am__btn:active { transform: translateY(0); box-shadow: none; }
.am__btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.am__btn-arrow { display: flex; align-items: center; }
[dir="rtl"] .am__btn-arrow svg { transform: scaleX(-1); }

/* Forgot link */
.am__link-subtle {
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--text-tertiary);
  text-align: center; padding: 10px 0 0; font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}
.am__link-subtle:hover { color: var(--accent); }

/* Divider */
.am__divider {
  height: 1px; background: var(--border-color);
  margin: var(--space-4) 0;
}

/* Switch text */
.am__switch {
  text-align: center; font-size: 13px; color: var(--text-tertiary);
  margin: 0; line-height: 1;
}
.am__link {
  background: none; border: none; cursor: pointer;
  color: var(--accent); font-weight: 600; font-size: 13px;
  padding: 0; margin-inline-start: 4px;
  transition: opacity var(--dur-fast) var(--ease);
}
.am__link:hover { opacity: 0.75; }

/* Success */
.am__success {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-4); padding: var(--space-8) var(--space-4);
  text-align: center;
}
.am__success-ring {
  width: 56px; height: 56px; border-radius: var(--radius-full);
  background: rgba(var(--muted-teal-rgb), 0.10);
  color: var(--muted-teal);
  display: flex; align-items: center; justify-content: center;
}
.am__success-ring svg { width: 24px; height: 24px; }
.am__success p {
  font-size: var(--text-base); color: var(--text-secondary); line-height: 1.6;
  max-width: 280px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .am__card { margin: var(--space-2); border-radius: 16px; max-height: 95vh; overflow-y: auto; }
  .am__body { padding: 0 var(--space-5) var(--space-6); }
  .am__brand { padding: var(--space-5) var(--space-5) var(--space-2); border-radius: 16px 16px 0 0; }
  .am__mascot { width: 56px; height: 56px; }
}

/* ---- Welcome Toast ---- */
.am-toast {
  position: fixed; bottom: 32px; left: 50%; z-index: 3000;
  transform: translateX(-50%) translateY(24px);
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px 14px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: 0 12px 40px rgba(61,64,91,0.14);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
.am-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.am-toast__mascot {
  width: 40px; height: 40px; object-fit: contain; flex-shrink: 0;
  mix-blend-mode: multiply;
}
[data-theme="dark"] .am-toast__mascot { mix-blend-mode: normal; }
[data-theme="dark"] .am-toast {
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.am-toast__text {
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text-primary); white-space: nowrap;
}
@media (max-width: 480px) {
  .am-toast { bottom: 20px; padding: 12px 20px 12px 14px; }
  .am-toast__mascot { width: 32px; height: 32px; }
  .am-toast__text { font-size: 13px; }
}

/* ============================================
   Auth User Menu (signed-in state)
   ============================================ */
.auth-user-menu {
  position: relative;
}

.auth-user-menu__avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: var(--text-sm);
  border: 2px solid transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast) var(--ease);
}
.auth-user-menu__avatar:hover {
  border-color: rgba(var(--burnt-peach-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--burnt-peach-rgb), 0.12);
}

.auth-user-menu__dropdown {
  position: absolute; top: calc(100% + 8px);
  right: 0; min-width: 220px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  padding: var(--space-3);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s var(--ease);
  z-index: 1001;
}
[dir="rtl"] .auth-user-menu__dropdown { right: auto; left: 0; }

.auth-user-menu__dropdown--open {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.auth-user-menu__info {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-2);
}
.auth-user-menu__name {
  font-weight: 600; font-size: var(--text-sm); color: var(--text-primary);
}
.auth-user-menu__email {
  font-size: var(--text-xs); color: var(--text-tertiary);
  direction: ltr; text-align: start;
}

.auth-user-menu__signout {
  width: 100%; text-align: start;
  padding: var(--space-2) var(--space-3);
  background: none; border: none; border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500;
  color: #e74c3c; cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.auth-user-menu__signout:hover { background: var(--bg-secondary); }
