/* ================================================================
   THE SCENE WITHIN — Glassmorphic Navbar  (nav.css)  v2
   ================================================================ */

/* ── Reset interference from style.css ── */
#main-header, #main-header * { box-sizing: border-box; }

/* ── Shell ── */
#main-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  padding: 24px 0;
  transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
#main-header * { pointer-events: auto; }

/* ── Wrapper ── */
.nav-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* ── The Pill (desktop only) ── */
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid transparent;
  box-shadow: none;
  padding: 16px 0;
  border-radius: 0;
  flex: 1;
  max-width: 100%;
  margin: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* ── Scrolled → glass pill ── */
#main-header.scrolled { padding: 12px 0; }

#main-header.scrolled .nav-content {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow:
    0 16px 48px rgba(26, 26, 46, 0.12),
    0 4px 12px  rgba(26, 26, 46, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 8px 12px 8px 24px;
  border-radius: 999px;
  max-width: 880px;
  margin: 0 auto;
}

/* ── Logo ── */
.tsw-logo {
  display: flex;
  align-items: center;
  gap: 14px; /* More breathing room */
  text-decoration: none;
  color: var(--color-ink);
  flex-shrink: 0;
  margin-right: auto;   /* pushes links + book-btn right */
  transition: opacity 0.2s;
}
.tsw-logo:hover { opacity: 0.8; }

.tsw-logo-img {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(26, 26, 46, 0.14);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.tsw-logo-text {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--color-ink);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  max-width: 260px;
  opacity: 1;
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s,
              font-size 0.4s;
}

/* Logo text stays visible but slightly smaller on scroll */
#main-header.scrolled .tsw-logo-img {
  width: 30px; height: 30px; min-width: 30px; border-radius: 8px;
}
#main-header.scrolled .tsw-logo-text {
  font-size: 1.6rem;
  max-width: 260px;
  opacity: 1;
}

/* Visibility fix for dark backgrounds (when not scrolled) */
.nav-dark-mode #main-header:not(.scrolled) .tsw-logo-text {
  color: var(--color-bg);
}
.nav-dark-mode #main-header:not(.scrolled) .tsw-nav-link {
  color: rgba(255, 255, 255, 0.85);
}
.nav-dark-mode #main-header:not(.scrolled) .tsw-nav-link:hover,
.nav-dark-mode #main-header:not(.scrolled) .tsw-nav-link.active {
  color: var(--color-bg);
}
.nav-dark-mode #main-header:not(.scrolled) .mobile-toggle .line {
  background-color: var(--color-bg);
}
.nav-dark-mode #main-header:not(.scrolled) .tsw-login-btn {
  color: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.3);
}
.nav-dark-mode #main-header:not(.scrolled) .tsw-signup-btn {
  background: var(--color-bg);
  color: var(--color-ink);
}

/* ── Desktop Nav Links ── */
.tsw-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  /* Space between logo and links, and links and book-btn */
  padding: 0 clamp(10px, 1.8vw, 24px);
}

.tsw-nav-link {
  text-decoration: none;
  color: var(--color-ink-soft);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 12px 2px;
  margin: 0 10px;
  border-radius: 0;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.tsw-nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
}
.tsw-nav-link:hover {
  color: var(--color-ink);
}
.tsw-nav-link.active {
  color: var(--color-accent);
}
.tsw-nav-link:hover::after,
.tsw-nav-link.active::after {
  width: 100%;
}

/* ── Book Button (inside pill) ── */
.tsw-book-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  background: var(--color-accent);
  color: #fff !important;
  padding: 10px 26px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  border: none;
  box-shadow: 0 4px 15px rgba(124, 92, 191, 0.2);
}

.tsw-book-btn:hover {
  transform: translateY(-2px);
  background: var(--color-accent-hover);
  box-shadow: 0 8px 25px rgba(124, 92, 191, 0.35);
  opacity: 1;
}

/* ── Auth Section (right of pill, outside it) ── */
.tsw-auth-section {
  display: flex;
  align-items: center;
  gap: 12px; /* Balanced gap */
  flex-shrink: 0;
  position: relative;
}

/* Log in ghost */
.tsw-login-btn {
  background: none;
  border: 1.5px solid var(--color-border-medium);
  color: var(--color-ink);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.tsw-login-btn:hover {
  border-color: var(--color-accent);
  background: rgba(124, 92, 191, 0.06);
  color: var(--color-accent);
}

/* Sign up solid */
.tsw-signup-btn {
  background: var(--color-accent-gradient);
  color: #fff !important;
  border: none;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 25px rgba(124, 92, 191, 0.35);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tsw-signup-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(124, 92, 191, 0.45);
}
/* Guest icon (mobile only trigger) hidden on desktop */
.tsw-guest-trigger { display: none; }

/* ── Profile avatar button ── */
.tsw-profile-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  line-height: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.tsw-profile-trigger:hover {
  transform: scale(1.08);
  outline-color: rgba(124, 92, 191, 0.3);
}
.tsw-profile-trigger:focus-visible {
  outline-color: var(--color-accent);
}

.tsw-profile-circle {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  background: var(--color-accent-gradient);
  border: 4px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 25px rgba(124, 92, 191, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 300;
  overflow: hidden;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tsw-profile-circle.has-avatar {
  background-size: cover;
  background-position: center;
  color: transparent;
}
.tsw-profile-circle img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ── Profile dropdown ── */
.tsw-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  width: 240px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 18px 50px rgba(26, 26, 46, 0.13),
    0 4px 12px rgba(26, 26, 46, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition:
    opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.28s;
  z-index: 200;
}
.tsw-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.tsw-dropdown-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.tsw-dropdown-header strong {
  display: block;
  font-size: 0.94rem;
  color: var(--color-ink);
  font-weight: 600;
}
.tsw-dropdown-header span {
  display: block;
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tsw-dropdown ul { list-style: none; padding: 8px 0; margin: 0; }
.tsw-dropdown li a,
.tsw-dropdown li button {
  display: block;
  width: calc(100% - 12px);
  text-align: left;
  padding: 11px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink-soft);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
  border-radius: 10px;
  margin: 0 6px;
  font-family: var(--font-body);
}
.tsw-dropdown li a:hover,
.tsw-dropdown li button:hover {
  background: rgba(124, 92, 191, 0.08);
  color: var(--color-accent);
  padding-left: 26px;
}
.tsw-dropdown li button.tsw-logout-btn {
  color: #ef4444;
}
.tsw-dropdown li button.tsw-logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

/* ── Mobile menu toggle redesign ── */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end; /* Creative alignment */
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
  gap: 5px;
  margin-right: 4px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.mobile-toggle .line {
  display: block;
  height: 2.2px;
  background-color: var(--color-ink);
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  position: relative;
}

/* Morphic line lengths */
.mobile-toggle .line-1 { width: 24px; }
.mobile-toggle .line-2 { width: 16px; transition-delay: 0.05s; }
.mobile-toggle .line-3 { width: 24px; transition-delay: 0.1s; }

/* Active (X) state */
.mobile-toggle.active {
  transform: rotate(90deg);
}

.mobile-toggle.active .line-1 {
  width: 22px;
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active .line-2 {
  opacity: 0;
  width: 0;
  transform: translateX(-10px);
}

.mobile-toggle.active .line-3 {
  width: 22px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─────────────────────────────────────────────────────────────
   MOBILE DRAWER — separate element, not the <ul>
   ─────────────────────────────────────────────────────────────
   The <ul#nav-links> stays hidden on mobile.
   A dedicated #mobile-drawer is used instead.
   ──────────────────────────────────────────────────────────── */
#mobile-drawer {
  display: none;  /* JS sets display:flex on .mobile-active */
  position: fixed;
  top: 64px; left: 0; right: 0;
  flex-direction: column;
  background: rgba(250, 249, 246, 0.97);
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 20px 28px;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  overflow-y: auto;
  max-height: calc(100vh - 64px);
}
#mobile-drawer.mobile-active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Mobile nav links inside drawer */
#mobile-drawer .tsw-mobile-link {
  display: block;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-ink);
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
#mobile-drawer .tsw-mobile-link:hover,
#mobile-drawer .tsw-mobile-link.active {
  background: rgba(124, 92, 191, 0.08);
  color: var(--color-accent);
}

/* Divider */
.tsw-drawer-divider {
  height: 1px;
  background: var(--color-border);
  margin: 12px 0;
}

/* CTA buttons in drawer */
.tsw-drawer-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.tsw-mobile-book,
.tsw-mobile-login-trigger {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.tsw-mobile-book {
  background: var(--color-accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.tsw-mobile-book:hover { transform: translateY(-1px); box-shadow: var(--shadow-accent-lg); }

.tsw-mobile-login-trigger,
.tsw-mobile-profile {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-border-medium) !important;
}
.tsw-mobile-login-trigger:hover,
.tsw-mobile-profile:hover {
  background: rgba(124, 92, 191, 0.05);
  border-color: var(--color-accent) !important;
  color: var(--color-accent);
}

/* ── Auth Modal Redesign & Onboarding ── */

.tsw-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(13, 13, 24, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px;
}
.tsw-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.tsw-modal-content {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(60px) saturate(210%);
  -webkit-backdrop-filter: blur(60px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  width: 100%;
  max-width: 460px;
  border-radius: 44px;
  padding: 64px 48px;
  position: relative;
  box-shadow: 
    0 50px 120px -30px rgba(26, 26, 46, 0.2),
    0 30px 60px -15px rgba(124, 92, 191, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
  max-height: 94vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.tsw-modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 180px;
  background: linear-gradient(180deg, rgba(124, 92, 191, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
  border-top-left-radius: 44px;
  border-top-right-radius: 44px;
  pointer-events: none;
  z-index: -1;
}
.tsw-modal-content::-webkit-scrollbar { display: none; }
.tsw-modal-overlay.active .tsw-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.tsw-modal-close {
  position: absolute;
  top: 24px; right: 24px;
  background: rgba(26, 26, 46, 0.04);
  border: 1px solid rgba(26, 26, 46, 0.03);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}
.tsw-modal-close:hover {
  background: #fff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tsw-auth-progress {
  margin-bottom: 24px;
  padding: 0 8px;
}
.tsw-progress-track {
  height: 6px;
  background: rgba(124, 92, 191, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.tsw-progress-bar {
  height: 100%;
  background: var(--color-accent-gradient);
  width: 33.33%;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.tsw-step-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.tsw-step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(124, 92, 191, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.tsw-step-dot.active {
  background: var(--color-accent);
  transform: scale(1.6);
  box-shadow: 0 0 10px rgba(124, 92, 191, 0.3);
}

.tsw-error-msg {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

/* ── Modal Branding & Typography ── */
.tsw-modal-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.tsw-modal-brand img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.tsw-modal-content h2 {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--color-ink);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.tsw-modal-subtitle {
  font-size: 0.88rem;
  color: var(--color-ink-muted);
  text-align: center;
  margin-bottom: 24px;
  font-weight: 400;
}

/* ── Input Groups (Floating Labels) ── */
.tsw-input-group {
  position: relative;
  margin-bottom: 16px;
}

.tsw-input-group input {
  width: 100%;
  padding: 24px 20px 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.01);
}

.tsw-input-group label {
  position: absolute;
  left: 20px;
  top: 16px;
  font-size: 1rem;
  color: var(--color-ink-muted);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tsw-profile-trigger:hover {
  background: rgba(124, 92, 191, 0.08);
  transform: translateY(-1px);
}
.tsw-profile-trigger[aria-expanded="true"] {
  background: rgba(124, 92, 191, 0.12);
  border-color: var(--color-accent);
}

.tsw-input-group input:focus,
.tsw-input-group input:not(:placeholder-shown) {
  background: #fff;
  border-color: var(--color-accent);
  box-shadow: 
    0 8px 30px rgba(124, 92, 191, 0.12),
    inset 0 0 0 1px var(--color-accent);
}

.tsw-input-group input:focus + label,
.tsw-input-group input:not(:placeholder-shown) + label {
  top: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 1;
}

/* Password Toggle */
.tsw-password-wrap {
  position: relative;
}
.tsw-toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-ink-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.tsw-toggle-password:hover { color: var(--color-accent); }
.tsw-toggle-password svg { width: 20px; height: 20px; }

/* ── Form Options ── */
.tsw-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 4px;
}
.tsw-remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  cursor: pointer;
}
.tsw-remember-me input {
  width: 16px; height: 16px;
  border-radius: 4px;
  accent-color: var(--color-accent);
}
.tsw-forgot-link {
  font-size: 0.85rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}
.tsw-forgot-link:hover { text-decoration: underline; }

.tsw-submit-btn {
  width: 100%;
  padding: 18px;
  background: var(--color-ink);
  color: #fff;
  border: none;
  border-radius: 999px; /* Pill shape for button */
  font-family: var(--font-ui, sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}
.tsw-submit-btn:hover {
  transform: translateY(-2px);
  background: var(--color-accent);
  box-shadow: 0 15px 35px rgba(124, 92, 191, 0.3);
}

/* Consolidated Premium Social Login */
.tsw-google-btn {
  width: 100%;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  color: var(--color-ink);
  border: 1px solid rgba(124, 92, 191, 0.15);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  text-decoration: none;
}
.tsw-google-btn:hover {
  background: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 15px 35px rgba(124, 92, 191, 0.12);
  transform: translateY(-2px);
}
.tsw-google-btn img {
  width: 24px;
  height: 24px;
}
.tsw-auth-divider {
  text-align: center;
  margin: 24px 0 8px;
  position: relative;
}
.tsw-auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  z-index: 1;
}
.tsw-auth-divider span {
  position: relative;
  background: #fff; /* matching modal content roughly */
  padding: 0 12px;
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  z-index: 2;
}

.tsw-submit-btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(124, 92, 191, 0.35);
}

.tsw-submit-btn:active { transform: translateY(0); scale: 0.98; }

#finishOnboarding, #goToDashboard {
  background: var(--color-accent-gradient);
  box-shadow: 0 10px 25px rgba(124, 92, 191, 0.25);
}
#finishOnboarding:hover, #goToDashboard:hover {
  box-shadow: 0 20px 40px rgba(124, 92, 191, 0.4);
}

/* Loader */
.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner {
  animation: rotate 2s linear infinite;
  width: 24px;
  height: 24px;
}
.spinner circle {
  stroke: currentColor;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate {
  100% { transform: rotate(360deg); }
}
@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* ── Divider ── */
.tsw-auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--color-ink-muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tsw-auth-divider::before,
.tsw-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}
.tsw-auth-divider span { padding: 0 16px; }

/* Removing redundant google-btn definition */

/* ── Footer ── */
.tsw-modal-footer {
  margin-top: 24px;
  text-align: center;
}
.tsw-modal-footer p {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
}
.tsw-modal-footer a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}
.tsw-modal-footer a:hover { text-decoration: underline; }

/* Onboarding Options */
.tsw-onboarding-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 30px;
}
.tsw-option-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid var(--color-border-medium);
  border-radius: 16px;
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.tsw-option-card:hover {
  border-color: var(--color-accent);
  background: rgba(124, 92, 191, 0.05);
  transform: translateY(-2px);
}
.tsw-option-card.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(124, 92, 191, 0.2);
}
.tsw-option-card.active span { color: #fff; }
.option-icon { font-size: 1.5rem; }
.tsw-option-card span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink);
}

/* Preference Items */
.tsw-preference-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}
.tsw-preference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 16px;
}
.pref-info strong {
  display: block;
  font-size: 0.9rem;
  color: var(--color-ink);
}
.pref-info p {
  font-size: 0.75rem;
  color: var(--color-ink-muted);
  margin-top: 2px;
}

/* Password Strength Indicator */
.tsw-password-strength {
  margin-top: 8px;
}
.strength-bar {
  height: 4px;
  background: rgba(124, 92, 191, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.4s ease;
}
#strengthText {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Switch Styles */
.tsw-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.tsw-switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.1);
  transition: .4s;
  border-radius: 24px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
input:checked + .switch-slider { background-color: var(--color-accent); }
input:checked + .switch-slider:before { transform: translateX(20px); }

/* Step Actions */
.tsw-step-actions {
  display: flex;
  gap: 12px;
}
.tsw-back-btn {
  flex: 1;
  padding: 14px;
  background: none;
  border: 1.5px solid var(--color-border-medium);
  color: var(--color-ink);
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.tsw-back-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
.tsw-next-btn {
  flex: 2;
  padding: 14px;
  background: var(--color-accent-gradient);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: all 0.2s;
}
.tsw-next-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent-lg);
}

/* Success Icon Animation */
.tsw-success-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.tsw-success-icon {
  width: 64px;
  height: 64px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  animation: scaleInSuccess 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tsw-success-icon svg { width: 32px; height: 32px; }

@keyframes scaleInSuccess {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Responsive adjustments for modal ── */
@media (max-width: 480px) {
  .tsw-modal-content {
    padding: 32px 24px;
    border-radius: 0;
    height: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* ── Desktop guard: never show mobile drawer on wide screens ── */
@media (min-width: 769px) {
  #mobile-drawer { display: none !important; }
}

/* ================================================================
   MOBILE RESPONSIVE  (≤ 768px)
   ================================================================ */
@media (max-width: 768px) {
  #main-header {
    padding: 0;
  }
  #main-header.scrolled {
    padding: 0;
  }

  .nav-wrapper {
    padding: 0 18px;
    height: 64px;
    background: rgba(250, 249, 246, 0.94);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.3s;
  }
  #main-header.scrolled .nav-wrapper {
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
  }

  /* Kill pill on mobile */
  .nav-content {
    padding: 0;
    border-radius: 0;
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    flex: 1;
  }

  /* Always show logo text on mobile, even when scrolled */
  #main-header.scrolled .tsw-logo-text {
    max-width: 200px;
    opacity: 1;
    font-size: 1.65rem;
  }
  #main-header.scrolled .tsw-logo-img {
    width: 32px; height: 32px; min-width: 32px;
  }

  /* Hide desktop-only elements */
  .mobile-toggle   { display: flex; align-items: center; }
  .tsw-nav-links   { display: none !important; }
  .tsw-book-btn    { display: none !important; }
  /* Auth section: visible on mobile for both Guest and User */
  .tsw-auth-section { 
    display: flex !important;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Desktop-only auth buttons hidden on mobile */
  .tsw-login-btn, .tsw-signup-btn { display: none !important; }

  /* Logout button in drawer */
  .tsw-mobile-login-trigger.tsw-logout-btn {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.2);
  }
  .tsw-mobile-login-trigger.tsw-logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
  }

  /* Guest icon for mobile */
  .tsw-guest-trigger {
    background: rgba(26, 26, 46, 0.05);
    border: 1.5px solid var(--color-border-medium);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-ink-muted);
    transition: all 0.2s;
  }
  .tsw-guest-trigger:hover {
    background: rgba(124, 92, 191, 0.05);
    border-color: var(--color-accent);
    color: var(--color-accent);
  }

  /* Ensure profile circle is same size */
  .tsw-profile-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  /* Mobile modal tweaks */
  .tsw-modal-content {
    padding: 36px 24px 28px;
    border-radius: 20px;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .tsw-logo-text { font-size: 1.5rem; }
  #main-header.scrolled .tsw-logo-text { font-size: 1.5rem; }
  #mobile-drawer { padding: 10px 16px 24px; }
}
