/* =========================
   Lomu Theme (cleaned)
   ========================= */

/* Color tokens (dark by default) */
:root {
  --bg: #000000;
  --surface: #121212;
  --border: #2A2A2A;
  --text-primary: #ffffff;
  --text-secondary: #A9A9A9;
  --accent: rgba(51,92,255,1);
  --radius-card: 12px;
  --radius-input: 8px;
  --input-bg: #0b0b0c;
  --selection: rgba(255,255,255,.08);
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f7f7f8;
  --border: #e5e7eb;
  --text-primary: #0b0b0c;
  --text-secondary: #4b5563;
  --accent: rgba(51,92,255,1);
  --input-bg: #ffffff;
  --selection: rgba(16,163,127,.18);
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}
::selection { background: var(--selection); }

/* Utilities */
.text-primary { color: var(--text-primary); }
.text-soft { color: var(--text-secondary); }
.bg-canvas { background: var(--bg); }
.bg-surface { background: var(--surface); }
.border-default { border-color: var(--border); }

/* Core components */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }

/* Modal header / signup title */
.modal-header { padding-bottom: 0.25rem; }
.modal-brand { width: 48px; height: 48px; border-radius: 9999px; display: grid; place-items: center; }
.modal-title { font-size: 1.0625rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.modal-sub { font-size: 0.9375rem; color: var(--text-secondary); margin: 0; }
.card .modal-header .modal-brand { box-shadow: 0 6px 18px rgba(51,92,255,0.12); }
.card .modal-header .modal-brand svg { width: 22px; height: 22px; color: white; }
.step-subtle { color: var(--text-secondary); font-size: 0.9rem; }

/* Enhanced title visuals */
.modal-title.gradient { background: linear-gradient(90deg, #2b6ef6 0%, #6f8cff 60%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Premium signup modal title */
.modal-title-expert {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #222;
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
  background: linear-gradient(90deg, #2b6ef6 0%, #6f8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.modal-title-expert .modal-title-accent {
  font-size: 1.45rem;
  font-weight: 900;
  background: linear-gradient(90deg, #2b6ef6 0%, #6f8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.modal-title-underline {
  display: block;
  width: 56px;
  height: 4px;
  margin: 0.5rem auto 0 auto;
  border-radius: 2px;
  background: linear-gradient(90deg, #2b6ef6 0%, #6f8cff 100%);
  opacity: 0.7;
  animation: underlinePulse 2.2s infinite cubic-bezier(.4,0,.2,1);
}
@keyframes underlinePulse {
  0%,100% { opacity: 0.7; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.15); }
}

/* small responsive tweaks */
@media (max-width: 420px) {
  .modal-brand { width:40px; height:40px; }
  .modal-title { font-size: 1rem; }
  .modal-sub { font-size: 0.85rem; }
}

.btn { display:inline-flex; align-items:center; justify-content:center; padding: .625rem 1rem; border-radius: 12px; font-weight: 600; line-height: 1; border: 1px solid transparent; transition: transform .15s ease, opacity .15s ease, background-color .15s ease; }
.btn:hover { transform: scale(1.02); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border); }

.input { background: var(--input-bg); border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius-input); padding: .75rem .875rem; }
.input::placeholder { color: var(--text-secondary); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(51,92,255,.25); }

/* Profile page: in dark theme ensure Display name input text is black
   (override only this specific field so global theme colors remain intact) */
/* Force the Profile "Display name" input text color to black regardless
   of theme. This targets the common renderings produced by Django's
   form widget (id `id_display_name` / name `display_name`) and the class
   variants used in templates. */
#profileForm input[name="display_name"],
#profileForm input#displayName,
#profileForm input[id^="id_display_name"],
#profileForm input.form-input[name="display_name"] {
  color: #000000 !important;
}

.badge { display:inline-flex; align-items:center; gap:.375rem; background: var(--input-bg); border: 1px solid var(--border); color: var(--text-secondary); border-radius: 999px; padding: .375rem .625rem; font-size: .8125rem; }

/* Glam helpers */
.glow { position: relative; }
.glow::before { content: ""; position: absolute; inset: -1px; z-index: -1; background: radial-gradient(60% 60% at 50% 0%, rgba(51,92,255,.25), transparent 70%); filter: blur(30px); border-radius: var(--radius-card); }
.shine-on-hover { position: relative; overflow: hidden; }
.shine-on-hover::after { content: ""; position: absolute; top: 0; left: -150%; width: 120%; height: 100%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transition: left .6s ease; }
.shine-on-hover:hover::after { left: 150%; }

/* Try button */
:root { --btn-blue-1:#1e3a8a; --btn-blue-2:#1d4ed8; --btn-blue-3:#3b82f6; --btn-blue-4:#60a5fa; --btn-glow: rgba(37,99,235,.45); }
.btn-try {
  position: relative;
  display:inline-flex; align-items:center; justify-content:center; gap:.35rem;
  padding: 1rem 1.75rem; border-radius: 9999px; font-size: 1.125rem; line-height: 1.25rem; font-weight: 800; color:#fff; text-decoration:none;
  background: linear-gradient(90deg, var(--btn-blue-1) 0%, var(--btn-blue-2) 35%, var(--btn-blue-3) 70%, var(--btn-blue-4) 100%);
  box-shadow: 0 12px 30px var(--btn-glow), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; will-change: transform, box-shadow; overflow: hidden; isolation: isolate;
}
.btn-try::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(100deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.10) 2%, rgba(96,165,250,.25) 8%, rgba(59,130,246,.18) 14%, rgba(29,78,216,.12) 22%, rgba(29,78,216,0) 35%);
  width: 42%; height: 160%; top: -30%; transform: translateX(-140%) skewX(-12deg); filter: blur(4px);
  animation: btnSheen 2.1s linear infinite; will-change: transform; mix-blend-mode: screen;
}
@keyframes btnSheen { from { transform: translateX(-140%) skewX(-12deg); } to { transform: translateX(220%) skewX(-12deg); } }
.btn-try:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 16px 36px rgba(37,99,235,.55), inset 0 1px 0 rgba(255,255,255,.30); }
.btn-try:hover svg { transform: translateX(2px); }
.btn-try:active { transform: translateY(0) scale(.99); }
@media (prefers-reduced-motion: reduce) { .btn-try::before{ animation: none; opacity: 0; } .btn-try, .btn-try *{ transition: none !important; } }

/* Compact variant of the Try button for use in modals and smaller components */
/* make .btn-try-sm visually identical to .btn-try (scaled to same appearance) */
.btn-try-sm {
  position: relative; display:inline-flex; align-items:center; justify-content:center; gap:.35rem;
  padding: 1rem 1.75rem; border-radius: 9999px; font-size: 1.125rem; line-height: 1.25rem; font-weight: 800; color:#fff; text-decoration:none;
  background: linear-gradient(90deg, var(--btn-blue-1) 0%, var(--btn-blue-2) 35%, var(--btn-blue-3) 70%, var(--btn-blue-4) 100%);
  box-shadow: 0 12px 30px var(--btn-glow), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; will-change: transform, box-shadow; overflow: hidden; isolation: isolate;
}
.btn-try-sm::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(100deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.10) 2%, rgba(96,165,250,.25) 8%, rgba(59,130,246,.18) 14%, rgba(29,78,216,.12) 22%, rgba(29,78,216,0) 35%);
  width: 42%; height: 160%; top: -30%; transform: translateX(-140%) skewX(-12deg); filter: blur(4px);
  animation: btnSheen 2.1s linear infinite; will-change: transform; mix-blend-mode: screen;
}
.btn-try-sm:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 16px 36px rgba(37,99,235,.55), inset 0 1px 0 rgba(255,255,255,.30); }
.btn-try-sm:hover svg { transform: translateX(2px); }
.btn-try-sm:active { transform: translateY(0) scale(.99); }

/* Sheen for compact try button */
.btn-try-sm {
  position: relative; overflow: hidden; isolation: isolate;
}
.btn-try-sm::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(100deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.08) 6%, rgba(96,165,250,.18) 18%, rgba(59,130,246,.14) 28%, rgba(29,78,216,.08) 40%, rgba(29,78,216,0) 55%);
  width: 40%; height: 140%; top: -20%; transform: translateX(-140%) skewX(-10deg); filter: blur(3px);
  animation: btnSheen 2.1s linear infinite;
  mix-blend-mode: screen;
}

/* When a compact try button is given the accent utility class, match the top-bar solid accent color */
.btn-try-sm.btn-accent {
  background: var(--accent) !important;
  box-shadow: none !important;
}
.btn-try-sm.btn-accent::before { display: none !important; }

/* Google social button (prominent, full-width) */
.btn-google {
  display: block;
  padding: 0.8rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: #3c4043;
  background: #ffffff;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-decoration: none;
  transition: all 0.2s ease;
  overflow: hidden;
}

.btn-google:hover {
  background: #f8faff;
  border-color: #d2e3fc;
  box-shadow: 0 2px 6px rgba(66,133,244,0.12);
  color: #1a73e8;
  transform: translateY(-1px);
}

.btn-google:active {
  background: #f4f8ff;
  border-color: #adc8fb;
  transform: translateY(0);
  transition-duration: 0.1s;
}

.btn-google .google-icon {
  width: 18px;
  height: 18px;
  flex: none;
  transform: scale(0.85);
  transform-origin: center;
  position: relative;
  top: -0.5px;
  transition: transform 0.15s ease;
}

.btn-google:hover .google-icon {
  transform: scale(0.9);
}

.btn-google .btn-label {
  font-weight: 500;
  letter-spacing: -0.01em;
}
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(16,24,40,0.08); }
.btn-google:active { transform: translateY(0); }
.btn-google:focus { outline: 3px solid rgba(66,133,244,0.20); outline-offset: 2px; }
.btn-google .btn-label { color: inherit; }
.btn-google.btn-try-sm { padding: 0.9rem 1rem; }
.btn-google.is-loading { opacity: 0.9; cursor: default; }
.btn-google.is-loading .btn-label { visibility: hidden; }
.btn-google.is-loading .btn-spinner { display: inline-block; visibility: visible; }

/* Spinner for buttons */
.btn-spinner { display: inline-block; width: 1rem; height: 1rem; margin-left: .5rem; vertical-align: middle; }
.btn-spinner svg { width: 100%; height: 100%; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.btn.is-loading, .btn-try-sm.is-loading { opacity: 0.9; cursor: default; }
.btn.is-loading .btn-label, .btn-try-sm.is-loading .btn-label { visibility: hidden; }
.btn.is-loading .btn-spinner, .btn-try-sm.is-loading .btn-spinner { display: inline-block; visibility: visible; }

/* Navigation menu */
summary::marker { content: ""; }
summary::-webkit-details-marker { display: none; }
.menu-panel { width: 28rem; border: 1px solid var(--border); border-radius: 14px; padding: .5rem; background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 88%, transparent), color-mix(in oklab, var(--bg) 94%, transparent)); backdrop-filter: blur(10px); box-shadow: 0 8px 20px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06); transform: translateY(6px) scale(.98); opacity: 0; pointer-events: none; transition: transform 160ms ease, opacity 160ms ease; }
details[open] .menu-panel { transform: translateY(10px) scale(1); opacity: 1; pointer-events: auto; }
.menu-caret { position: absolute; top: calc(100% + 6px); left: 18px; width: 12px; height: 12px; rotate: 45deg; background: color-mix(in oklab, var(--bg) 92%, transparent); border-left: 1px solid var(--border); border-top: 1px solid var(--border); z-index: 49; }
.account-menu-panel { width: 12rem; right: 0; left: auto; }
.account-menu-caret { left: auto; right: 18px; }
.chev { transition: transform 160ms ease; }
details[open] .chev { transform: rotate(180deg); }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }
@media (max-width: 640px) { .menu-grid { grid-template-columns: 1fr; } }
.menu-item { display: flex; align-items: center; gap: .75rem; border-radius: 10px; padding: .65rem .6rem; text-decoration: none; color: inherit; outline: none; cursor: pointer; width: 100%; box-sizing: border-box; }
.menu-item:hover { background: color-mix(in oklab, var(--surface) 24%, transparent); }
.menu-item:focus-visible { box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 22%, transparent); }
.account-menu-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border-radius: 8px; text-decoration: none; color: inherit; transition: background-color 0.15s ease; width: 100%; box-sizing: border-box; }
.account-menu-item:hover { background: color-mix(in oklab, var(--surface) 24%, transparent); }
.account-menu-icon { flex-shrink: 0; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.account-menu-text { flex: 1; font-size: 0.875rem; font-weight: 500; line-height: 1.25; }
.menu-icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in oklab, var(--primary) 15%, var(--surface)); border: 1px solid color-mix(in oklab, var(--primary) 20%, var(--border)); }
.menu-title { font-weight: 700; line-height: 1.2; }
.menu-desc { font-size: .85rem; opacity: .75; line-height: 1.2; margin-top: .15rem; }
.menu-footer { margin-top: .35rem; padding-top: .35rem; border-top: 1px dashed var(--border); }
.menu-footer a { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; padding: .5rem .6rem; border-radius: 8px; }
.menu-footer a:hover { background: color-mix(in oklab, var(--surface) 24%, transparent); }
.badge-new { font-size: .7rem; padding: .15rem .4rem; border-radius: 999px; background: color-mix(in oklab, var(--primary) 18%, var(--surface)); border: 1px solid color-mix(in oklab, var(--primary) 30%, var(--border)); margin-left: .4rem; }
.logout-form { margin: 0; padding: 0; background: transparent; border: none; width: 100%; }
.logout-button { display: flex; align-items: center; gap: 0.75rem; background: transparent; border: none; color: inherit; font: inherit; cursor: pointer; padding: 0.5rem 0.75rem; margin: 0; text-align: left; width: 100%; border-radius: 8px; transition: background-color 0.15s ease; }
.logout-button:hover { background: color-mix(in oklab, var(--surface) 24%, transparent); }

/* Background utilities */
.bg-gradient-hero { background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%); }
.bg-blur-accent { background: radial-gradient(60% 60% at 50% 50%, rgba(37,99,235,.35) 0%, rgba(37,99,235,0) 70%); }
.bg-accent-solid { background: var(--accent); }
.bg-blur-light { background: color-mix(in oklab, var(--bg) 85%, transparent); }
.bg-blur-medium { background: color-mix(in oklab, var(--bg) 70%, transparent); }

/* =========================
   Enhanced Tapping Design
   ========================= */

/* Base interactive element styles */
.btn, .seamless-tab, .menu-item, .account-menu-item, 
.btn-google, .btn-try, .btn-try-sm {
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  cursor: pointer;
}

/* Enhanced button active states with theme-aware feedback */
.btn:active, .seamless-tab:active, .menu-item:active,
.account-menu-item:active, .btn-google:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

/* Theme-aware active state backgrounds */
.btn-accent:active {
  background: color-mix(in srgb, var(--accent) 90%, black 10%);
  box-shadow: 
    0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--accent) 60%, white 40%);
}

.btn-ghost:active {
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
  border-color: color-mix(in srgb, var(--border) 80%, var(--text-primary) 20%);
}

/* Enhanced tab button active states */
.seamless-tab:active {
  background: color-mix(in srgb, var(--surface) 60%, var(--bg) 40%);
  transform: translateY(0) scale(0.98);
}

.seamless-tab.active:active {
  background: color-mix(in srgb, var(--surface) 95%, black 5%);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Menu item active states */
.menu-item:active, .account-menu-item:active {
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  transform: scale(0.995);
}

/* Google button active state */
.btn-google:active {
  background: color-mix(in srgb, #f8faff 90%, black 10%);
  border-color: color-mix(in srgb, #d2e3fc 80%, black 20%);
  transform: translateY(0) scale(0.98);
}

/* Try button active state enhancements */
.btn-try:active, .btn-try-sm:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 
    0 4px 12px color-mix(in srgb, var(--btn-glow) 40%, transparent),
    inset 0 1px 0 color-mix(in srgb, rgba(255,255,255,.22) 60%, black 40%);
}

/* Ripple effect for premium buttons */
.btn-try, .btn-try-sm, .btn-accent {
  position: relative;
  overflow: hidden;
}

.btn-try::after, .btn-try-sm::after, .btn-accent::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.btn-try:active::after, .btn-try-sm:active::after, .btn-accent:active::after {
  width: 100px;
  height: 100px;
  opacity: 0;
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}

/* Input field interactions */
.input {
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.input:active {
  transform: scale(0.995);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border) 40%);
}

/* Card interactions */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:active {
  transform: scale(0.998);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Delete button specific interactions */
#deleteAccountBtn, #cancelDelete, 
[type="submit"][class*="bg-red-600"] {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#deleteAccountBtn:active {
  background: color-mix(in srgb, #dc2626 90%, black 10%);
  border-color: color-mix(in srgb, #dc2626 80%, black 20%);
  transform: scale(0.96);
}

[type="submit"][class*="bg-red-600"]:active {
  background: color-mix(in srgb, #dc2626 85%, black 15%);
  transform: scale(0.96);
}

#cancelDelete:active {
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  transform: scale(0.96);
}

/* Modal backdrop interaction */
[data-delete-modal-backdrop]:active {
  background: color-mix(in srgb, black 60%, transparent);
}

/* Enhanced focus states for better accessibility */
.btn:focus-visible, .seamless-tab:focus-visible, 
.input:focus-visible, .menu-item:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
  transform: scale(1.02);
}

/* Pressed state visual feedback */
.is-pressed {
  transform: scale(0.98) !important;
  transition-duration: 0.1s !important;
}

.btn.is-pressed {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.btn-accent.is-pressed {
  background: color-mix(in srgb, var(--accent) 85%, black 15%) !important;
}

.btn-ghost.is-pressed {
  background: color-mix(in srgb, var(--text-primary) 12%, transparent) !important;
}

/* Tab button pressed states */
.seamless-tab.is-pressed {
  background: color-mix(in srgb, var(--surface) 70%, var(--bg) 30%) !important;
}

.seamless-tab.active.is-pressed {
  background: color-mix(in srgb, var(--surface) 90%, black 10%) !important;
}

/* Dark mode specific enhancements */
@media (prefers-color-scheme: dark) {
  .btn-ghost:active {
    background: color-mix(in srgb, var(--surface) 30%, transparent);
    border-color: color-mix(in srgb, var(--border) 60%, white 40%);
  }
  
  .seamless-tab:active {
    background: color-mix(in srgb, var(--surface) 40%, transparent);
  }
  
  .seamless-tab.active:active {
    background: color-mix(in srgb, var(--surface) 80%, white 20%);
    box-shadow: 
      0 1px 3px rgba(0, 0, 0, 0.3),
      inset 0 1px 2px rgba(255, 255, 255, 0.05);
  }
  
  .card:active {
    box-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.2),
      0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .btn-ghost.is-pressed {
    background: color-mix(in srgb, var(--surface) 35%, transparent) !important;
  }
  
  .seamless-tab.is-pressed {
    background: color-mix(in srgb, var(--surface) 45%, transparent) !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .btn, .seamless-tab, .menu-item, .account-menu-item,
  .btn-google, .btn-try, .btn-try-sm, .input, .card {
    transition: none;
    transform: none !important;
  }
  
  .btn-try::after, .btn-try-sm::after, .btn-accent::after {
    display: none;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn, .seamless-tab, .menu-item, .account-menu-item {
    min-height: 44px;
    min-width: 44px;
  }
  
  .input {
    min-height: 44px;
  }
  
  /* Larger tap targets for mobile */
  .seamless-tab {
    padding: 12px 16px;
  }
  
  .menu-item, .account-menu-item {
    padding: 12px 16px;
  }
}

/* =========================
   Seamless Border Integration Design
   ========================= */

.seamless-tabs-container {
  position: relative;
}

.seamless-tabs {
  display: flex;
  gap: 0;
  position: relative;
  z-index: 10;
}

.seamless-tab {
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  position: relative;
  margin-bottom: -1px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Default tab state - disconnected from content */
.seamless-tab:not(.active) {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border-bottom: 1px solid var(--border);
  transform: translateY(1px);
}

/* Active tab state - seamlessly connected to content */
.seamless-tab.active {
  background: var(--surface);
  color: var(--text-primary);
  transform: translateY(0);
  z-index: 20;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

/* Create the seamless connection */
.seamless-tab.active::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background: var(--surface);
  z-index: 25;
}

/* Subtle accent indicator */
.seamless-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  z-index: 30;
  transition: all 0.3s ease;
}

/* Hover states */
.seamless-tab:hover:not(.active) {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text-primary);
  transform: translateY(0.5px);
}

.seamless-tab.active:hover {
  background: color-mix(in srgb, var(--surface) 98%, black 2%);
}

/* Focus states */
.seamless-tab:focus {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent);
  z-index: 40;
}

/* Content area styling */
.seamless-content {
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 8px;
  background: var(--surface);
  position: relative;
  z-index: 5;
  animation: contentReveal 0.3s ease-out;
}

@keyframes contentReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* First tab special styling */
.seamless-tab:first-child {
  border-radius: 8px 0 0 0;
}

.seamless-tab:last-child {
  border-radius: 0 8px 0 0;
}

/* Active state interactions */
.seamless-tab:active {
  transform: translateY(1px);
  transition-duration: 0.1s;
}

.seamless-tab.active:active {
  transform: translateY(0);
}

/* Pressed state for enhanced feedback */
.seamless-tab.is-pressed {
  transform: translateY(1px) scale(0.98);
  transition-duration: 0.1s;
}

.seamless-tab.active.is-pressed {
  transform: translateY(0) scale(0.98);
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  .seamless-tab.active {
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.3);
  }
  
  .seamless-tab:not(.active) {
    background: color-mix(in srgb, var(--surface) 40%, transparent);
  }
  
  .seamless-tab.active:hover {
    background: color-mix(in srgb, var(--surface) 96%, white 4%);
  }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .seamless-tab {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    flex: 1;
    text-align: center;
    min-height: 48px;
  }
  
  .seamless-tabs {
    gap: 0;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .seamless-tab {
    transition: none;
  }
  
  @keyframes contentReveal {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* Enhanced visual feedback for better UX */
.seamless-tab {
  position: relative;
  overflow: hidden;
}

.seamless-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    color-mix(in srgb, var(--accent) 15%, transparent), 
    transparent
  );
  transition: left 0.6s ease;
}

.seamless-tab:hover::before {
  left: 100%;
}

/* Ensure proper contrast in all themes */
.seamless-tab.active {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Smooth transitions for all interactive states */
.seamless-tab {
  transition: 
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Container completion animation */
.seamless-content {
  transition: border-radius 0.2s ease;
}

/* Profile success animations */
.profile-success-banner { 
  display: flex; 
  align-items: center; 
  gap: .5rem; 
}

.profile-check { 
  width: 20px; 
  height: 20px; 
  display: inline-block; 
  transform-origin: center; 
}

@keyframes profilePop {
  0% { transform: scale(.9); opacity: 0; }
  60% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.profile-pop { 
  animation: profilePop 420ms cubic-bezier(.2,.9,.3,1) both; 
}