/* ============================================================
   smoothly-global.css
   Smoothly.me — Global Design System
   Version: 1.0 | March 2026
   
   Usage: <link rel="stylesheet" href="smoothly-global.css">
   Import BEFORE any page-specific styles.
   ============================================================ */


/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');


/* ── Design Tokens ────────────────────────────────────────── */
:root {

  /* Backgrounds */
  --bg-primary:        #ffffff;
  --bg-secondary:      #f8f8f8;
  --bg-card:           #ffffff;
  --bg-card-hover:     #f5f5f5;
  --bg-input:          #ffffff;

  /* Brand / Accent */
  --accent:            #fb5a62;
  --accent-hover:      #e14e55;
  --accent-glow:       rgba(251, 90, 98, 0.12);
  --accent-glow-strong:rgba(251, 90, 98, 0.20);

  /* Typography */
  --text-primary:      #333333;
  --text-secondary:    #666666;
  --text-muted:        #888888;
  --text-faint:        #dcdcdc;

  /* Borders */
  --border:            rgba(0, 0, 0, 0.10);
  --border-hover:      rgba(0, 0, 0, 0.15);
  --border-focus:      rgba(251, 90, 98, 0.40);

  /* Semantic */
  --success:           #3a9e6e;
  --success-bg:        rgba(58, 158, 110, 0.08);
  --error:             #e14e55;
  --error-bg:          rgba(225, 78, 85, 0.08);
  --purple:            #7c6dd8;
  --purple-glow:       rgba(124, 109, 216, 0.12);

  /* Fonts */
  --font-display:      'Playfair Display', Georgia, serif;
  --font-body:         'DM Sans', 'Helvetica Neue', sans-serif;

  /* Aliases — older pages use --font-d / --font-b / --bg / --card / --text etc. */
  /* These keep backwards compatibility without changing existing pages */
  --font-d:            var(--font-display);
  --font-b:            var(--font-body);
  --bg:                var(--bg-primary);
  --bg2:               var(--bg-secondary);
  --card:              var(--bg-card);
  --card-hover:        var(--bg-card-hover);
  --text:              var(--text-primary);
  --text2:             var(--text-secondary);
  --muted:             var(--text-muted);
  --faint:             var(--text-faint);
  --accent-h:          var(--accent-hover);

  /* Spacing scale */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Border radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-accent: 0 8px 24px rgba(251, 90, 98, 0.20);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.20s ease;
  --transition-slow: 0.35s ease;

  /* Z-index scale */
  --z-base:     10;
  --z-header:   100;
  --z-nav:      200;
  --z-dropdown: 300;
  --z-modal:    1000;
  --z-top:      9999;
}


/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover {
  color: var(--accent-hover);
}

input, textarea, button, select {
  font-family: inherit;
  font-size: inherit;
}

input, textarea {
  font-size: 16px; /* prevents iOS zoom on focus */
}


/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 500;
}

h1 { font-size: clamp(28px, 5vw, 42px); }
h2 { font-size: clamp(22px, 3.5vw, 32px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }
h4 { font-size: 18px; }

p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}


/* ── Atmospheric Background Glow ──────────────────────────── */
/* Apply .has-glow to <body> to get the subtle top radial accent */
body.has-glow::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 500px;
  background: radial-gradient(
    ellipse 800px 400px at 50% -100px,
    rgba(251, 90, 98, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}


/* ── Fixed Navigation Chrome ──────────────────────────────── */

/* Profile icon button — top left */
.profile-icon-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-nav);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.profile-icon-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Profile dropdown */
.profile-dropdown {
  position: fixed;
  top: 64px;
  left: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: var(--z-dropdown);
  display: none;
  overflow: hidden;
  animation: fadeDown var(--transition-fast);
}
.profile-dropdown.open { display: block; }

.profile-dropdown a,
.profile-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 18px;
  font-size: 13px;
  font-family: var(--font-body);
  color: #333;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.profile-dropdown a:hover,
.profile-dropdown button:hover { background: #f8f8f8; }

.profile-dropdown .dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.profile-dropdown .danger { color: var(--error); }
.profile-dropdown .danger:hover { background: var(--error-bg); }

/* Back link — top left, beside profile icon */
.back-link {
  position: fixed;
  top: 20px;
  left: 68px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
  letter-spacing: 0.3px;
  z-index: var(--z-nav);
}
.back-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* SMTHLY token counter — top right */
.token-counter {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  z-index: var(--z-header);
  min-width: 80px;
}
.token-counter:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.token-counter .token-number {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--success);
  line-height: 1.1;
}
.token-counter .token-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.token-counter .token-cta {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  margin-top: 3px;
  text-align: center;
  line-height: 1.3;
}


/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  color: #ffffff;
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--error);
  color: #ffffff;
}
.btn-danger:hover {
  background: #c0392b;
  box-shadow: 0 4px 16px rgba(225, 78, 85, 0.25);
}

.btn-sm {
  font-size: 12px;
  padding: 8px 16px;
}

.btn-lg {
  font-size: 16px;
  padding: 16px 36px;
  border-radius: var(--radius-md);
}

.btn-full { width: 100%; }


/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}
.card.card-accent:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}


/* ── Form Elements ────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  -webkit-appearance: none;
  appearance: none;
}
.input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input::placeholder {
  color: var(--text-muted);
}

textarea.input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-group {
  margin-bottom: var(--space-md);
}


/* ── Modals ───────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
  animation: fadeIn var(--transition-base);
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUp var(--transition-slow);
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 500;
}
.modal p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}


/* ── Badges / Pills ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.badge-accent  { background: var(--accent);    color: #fff; }
.badge-success { background: var(--success);   color: #fff; }
.badge-muted   { background: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--border); }
.badge-coming-soon {
  background: var(--text-muted);
  color: #fff;
  font-size: 8px;
  padding: 2px 7px;
}


/* ── Spinner / Loading ────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(251, 90, 98, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}


/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}


/* ── Utility Classes ──────────────────────────────────────── */
.text-accent   { color: var(--accent) !important; }
.text-success  { color: var(--success) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-primary  { color: var(--text-primary) !important; }
.text-center   { text-align: center; }

.font-display  { font-family: var(--font-display); }
.font-body     { font-family: var(--font-body); }

.mt-0  { margin-top: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.hidden  { display: none !important; }
.visible { display: block !important; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col    { display: flex; flex-direction: column; }
.gap-sm      { gap: var(--space-sm); }
.gap-md      { gap: var(--space-md); }


/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .profile-icon-btn {
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
  }

  .back-link {
    top: 12px;
    left: 52px;
    font-size: 12px;
    padding: 7px 12px;
  }

  .token-counter {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    min-width: 44px;
  }
  .token-counter .token-number { font-size: 14px; }
  .token-counter .token-cta   { display: none; }

  .modal {
    padding: 28px 20px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .back-link {
    top: 10px;
    left: 50px;
    font-size: 11px;
    padding: 5px 10px;
  }
}


/* ── Scrollbar (subtle, webkit) ───────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }


/* ============================================================
   PREMIUM ENHANCEMENTS — extracted from v0 design system
   March 2026
   ============================================================ */


/* ── Premium Button ───────────────────────────────────────── */
/*
   Upgrades .btn-primary with:
   - Gradient depth (top highlight → base color)
   - Layered box shadow for physical lift
   - Hover: rise + glow
   - Shine sweep animation on hover
   - Active: press-down feedback
*/

.btn-primary {
  background: linear-gradient(
    to bottom,
    var(--accent),
    var(--accent) 60%,
    var(--accent-hover)
  );
  box-shadow:
    0 1px 2px rgba(0,0,0,0.07),
    0 2px 4px rgba(0,0,0,0.07),
    0 4px 8px rgba(0,0,0,0.07),
    inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}

/* Top highlight pseudo-element */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.18) 0%,
    transparent 50%,
    transparent 100%
  );
  pointer-events: none;
}

/* Shine sweep — slides across on hover */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255,255,255,0.22) 50%,
    transparent 75%
  );
  transform: translateX(-100%);
  transition: transform 0.65s ease;
  pointer-events: none;
}

.btn-primary:hover {
  background: linear-gradient(
    to bottom,
    var(--accent),
    var(--accent) 60%,
    var(--accent-hover)
  );
  box-shadow:
    0 4px 12px var(--accent-glow),
    0 8px 24px var(--accent-glow),
    0 16px 48px var(--accent-glow-strong);
  transform: translateY(-2px) scale(1.015);
  color: #ffffff;
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

.btn-primary:active {
  transform: translateY(0) scale(1);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.10);
  transition-duration: 0.08s;
}

.btn-primary:disabled,
.btn-primary:disabled:hover {
  transform: none;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.07),
    inset 0 1px 0 rgba(255,255,255,0.10);
  background: linear-gradient(
    to bottom,
    var(--accent),
    var(--accent-hover)
  );
}

/* Secondary button — subtle gradient lift */
.btn-secondary {
  background: linear-gradient(
    to bottom,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.60);
}

.btn-secondary:hover {
  background: linear-gradient(
    to bottom,
    rgba(251,90,98,0.04) 0%,
    rgba(251,90,98,0.08) 100%
  );
  border-color: rgba(251,90,98,0.50);
  box-shadow:
    0 4px 12px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.60);
  transform: translateY(-1px);
  color: var(--accent);
}

.btn-secondary:active {
  transform: translateY(0);
  background: var(--bg-secondary);
}


/* ── Premium Card ─────────────────────────────────────────── */
/*
   Upgrades .card with:
   - Subtle gradient depth (card → muted)
   - Top-edge highlight (inset white)
   - Hover: rise + accent border tint + glow
   - Selected state with accent border + glow
*/

.card {
  background: linear-gradient(
    to bottom,
    var(--bg-card) 0%,
    var(--bg-card) 70%,
    rgba(0,0,0,0.012) 100%
  );
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 4px 12px rgba(0,0,0,0.03),
    inset 0 1px 0 rgba(255,255,255,0.60);
}

.card:hover {
  border-color: rgba(251,90,98,0.25);
  box-shadow:
    0 8px 30px rgba(0,0,0,0.07),
    0 4px 12px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.80);
  transform: translateY(-4px) scale(1.008);
}

.card.card-selected {
  border: 2px solid rgba(251,90,98,0.55);
  background: linear-gradient(
    to bottom,
    rgba(251,90,98,0.04) 0%,
    var(--bg-card) 40%,
    var(--bg-card) 100%
  );
  box-shadow:
    0 0 0 1px var(--accent-glow),
    0 4px 12px var(--accent-glow),
    0 12px 48px rgba(0,0,0,0.08);
}

/* Glass card variant — for overlays and modals */
.card-glass {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow:
    0 4px 24px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.50);
  border-radius: var(--radius-lg);
}


/* ── Premium Input ────────────────────────────────────────── */
/*
   Upgrades .input with:
   - Gradient background (card → subtle muted)
   - Top-edge highlight
   - Focus: accent border + glow ring
*/

.input {
  background: linear-gradient(
    to bottom,
    var(--bg-card) 0%,
    rgba(0,0,0,0.008) 100%
  );
  box-shadow:
    0 1px 2px rgba(0,0,0,0.02),
    inset 0 1px 0 rgba(255,255,255,0.50);
  border-color: rgba(0,0,0,0.09);
}

.input:focus {
  border-color: rgba(251,90,98,0.50);
  box-shadow:
    0 0 0 3px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.50);
  background: var(--bg-card);
}

.input:hover:not(:focus) {
  border-color: rgba(0,0,0,0.14);
}


/* ── Premium Modal ────────────────────────────────────────── */
/*
   Upgrades .modal-overlay and .modal with:
   - backdrop-filter blur on overlay
   - zoom + slide entrance animation
   - Refined shadow depth
*/

.modal-overlay {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.55);
}

.modal {
  box-shadow:
    0 24px 64px rgba(0,0,0,0.18),
    0 8px 24px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.60);
  animation: premiumModalIn 0.30s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes premiumModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* ── Profile Icon Button ──────────────────────────────────── */
/* Upgraded with gradient and inset highlight */
.profile-icon-btn {
  background: linear-gradient(
    to bottom,
    var(--bg-card) 0%,
    var(--bg-secondary) 100%
  );
  box-shadow:
    0 1px 3px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.60);
}

.profile-icon-btn:hover {
  box-shadow:
    0 4px 16px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.60);
}


/* ── Token Counter ────────────────────────────────────────── */
/* Upgraded with gradient depth */
.token-counter {
  background: linear-gradient(
    to bottom,
    var(--bg-card) 0%,
    var(--bg-secondary) 100%
  );
  box-shadow:
    0 1px 3px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.60);
}

.token-counter:hover {
  box-shadow:
    0 4px 16px var(--accent-glow),
    0 8px 32px var(--accent-glow-strong),
    inset 0 1px 0 rgba(255,255,255,0.60);
}


/* ── Back Link ────────────────────────────────────────────── */
.back-link {
  background: linear-gradient(
    to bottom,
    var(--bg-card) 0%,
    var(--bg-secondary) 100%
  );
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.60);
}

.back-link:hover {
  box-shadow:
    0 4px 12px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.60);
}


/* ── Badge upgrades ───────────────────────────────────────── */
.badge-accent {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    rgba(251,90,98,0.85) 100%
  );
  box-shadow: 0 0 12px var(--accent-glow);
}

.badge-success {
  background: linear-gradient(
    135deg,
    var(--success) 0%,
    rgba(58,158,110,0.85) 100%
  );
  box-shadow: 0 0 12px rgba(58,158,110,0.20);
}


/* ── Spinner upgrade ──────────────────────────────────────── */
.spinner {
  border-color: rgba(251,90,98,0.12);
  border-top-color: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent-glow));
}


/* ── Smooth hover transitions on interactive elements ─────── */
.btn, .card, .input, .token-counter,
.back-link, .profile-icon-btn, .badge {
  will-change: transform;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after    { transition: none; }
  .btn-primary:hover,
  .btn-secondary:hover,
  .card:hover,
  .back-link:hover,
  .token-counter:hover   { transform: none; }
  .modal                 { animation: fadeIn 0.2s ease; }
}


/* ============================================================
   CLASS ALIASES — maps Smoothly's existing page class names
   to the premium design system without changing any HTML
   ============================================================ */

/* ── Primary action buttons ───────────────────────────────── */
.btn-next,
.btn-publish,
.btn-save,
.confirm-btn,
.continue-btn,
.card-cta,
.pack-buy-btn,
.subscription-cta,
.ref-share-primary,
.submit-button,
.resume-btn,
.select-btn,
.gift-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  color: #ffffff;
  background: linear-gradient(
    to bottom,
    var(--accent),
    var(--accent) 60%,
    var(--accent-hover)
  );
  box-shadow:
    0 1px 2px rgba(0,0,0,0.07),
    0 2px 4px rgba(0,0,0,0.07),
    0 4px 8px rgba(0,0,0,0.07),
    inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  will-change: transform;
}

.btn-next::before,
.btn-publish::before,
.btn-save::before,
.confirm-btn::before,
.continue-btn::before,
.card-cta::before,
.pack-buy-btn::before,
.subscription-cta::before,
.ref-share-primary::before,
.submit-button::before,
.resume-btn::before,
.select-btn::before,
.gift-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.18) 0%, transparent 50%);
  pointer-events: none;
}

.btn-next::after,
.btn-publish::after,
.btn-save::after,
.confirm-btn::after,
.continue-btn::after,
.card-cta::after,
.pack-buy-btn::after,
.subscription-cta::after,
.ref-share-primary::after,
.submit-button::after,
.resume-btn::after,
.select-btn::after,
.gift-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,0.22) 50%, transparent 75%);
  transform: translateX(-100%);
  transition: transform 0.65s ease;
  pointer-events: none;
}

.btn-next:hover,
.btn-publish:hover,
.btn-save:hover,
.confirm-btn:hover,
.continue-btn:hover,
.card-cta:hover,
.pack-buy-btn:hover,
.subscription-cta:hover,
.ref-share-primary:hover,
.submit-button:hover,
.resume-btn:hover,
.select-btn:hover,
.gift-btn:hover {
  color: #ffffff;
  box-shadow:
    0 4px 12px var(--accent-glow),
    0 8px 24px var(--accent-glow),
    0 16px 48px var(--accent-glow-strong);
  transform: translateY(-2px) scale(1.015);
}

.btn-next:hover::after,
.btn-publish:hover::after,
.btn-save:hover::after,
.confirm-btn:hover::after,
.continue-btn:hover::after,
.card-cta:hover::after,
.pack-buy-btn:hover::after,
.subscription-cta:hover::after,
.ref-share-primary:hover::after,
.submit-button:hover::after,
.resume-btn:hover::after,
.select-btn:hover::after,
.gift-btn:hover::after {
  transform: translateX(100%);
}

.btn-next:active,
.btn-publish:active,
.btn-save:active,
.confirm-btn:active,
.continue-btn:active,
.card-cta:active,
.pack-buy-btn:active,
.subscription-cta:active,
.ref-share-primary:active,
.submit-button:active,
.resume-btn:active,
.select-btn:active,
.gift-btn:active {
  transform: translateY(0) scale(1);
  transition-duration: 0.08s;
}

.btn-next:disabled,
.btn-publish:disabled,
.btn-save:disabled,
.confirm-btn:disabled,
.continue-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* ── Secondary / ghost buttons ────────────────────────────── */
.btn-back,
.btn-cancel,
.btn-skip,
.secondary,
.ref-share-secondary,
.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(to bottom, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.60);
  transition: all var(--transition-base);
  will-change: transform;
}

.btn-back:hover,
.btn-cancel:hover,
.btn-skip:hover,
.secondary:hover,
.ref-share-secondary:hover,
.modal-btn:hover {
  border-color: rgba(251,90,98,0.50);
  color: var(--accent);
  background: linear-gradient(to bottom, rgba(251,90,98,0.04) 0%, rgba(251,90,98,0.08) 100%);
  box-shadow:
    0 4px 12px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.60);
  transform: translateY(-1px);
}

.btn-back:active,
.btn-cancel:active,
.btn-skip:active,
.secondary:active,
.ref-share-secondary:active {
  transform: translateY(0);
}


/* ── Danger buttons ───────────────────────────────────────── */
.danger {
  background: linear-gradient(to bottom, var(--error), #c0392b);
  color: #ffffff;
  border: none;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.07),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition: all var(--transition-base);
}

.danger:hover {
  box-shadow:
    0 4px 16px rgba(225,78,85,0.30),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translateY(-1px);
  color: #ffffff;
}


/* ── Input aliases ────────────────────────────────────────── */
.field-input,
.received-input,
.response-input {
  background: linear-gradient(to bottom, var(--bg-card) 0%, rgba(0,0,0,0.008) 100%);
  border: 1px solid rgba(0,0,0,0.09);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.02),
    inset 0 1px 0 rgba(255,255,255,0.50);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  font-size: 16px;
  font-family: var(--font-body);
}

.field-input:focus,
.received-input:focus,
.response-input:focus {
  border-color: rgba(251,90,98,0.50);
  box-shadow:
    0 0 0 3px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.50);
  outline: none;
  background: var(--bg-card);
}


/* ── Bubble button (settings.html legacy) ─────────────────── */
.bubble-button {
  background: linear-gradient(to bottom, var(--accent), var(--accent-hover));
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow:
    0 2px 8px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all var(--transition-base);
}

.bubble-button:hover {
  box-shadow:
    0 6px 20px var(--accent-glow),
    0 12px 32px var(--accent-glow-strong),
    inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-2px);
}


/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .btn-next, .btn-publish, .btn-save, .confirm-btn, .continue-btn,
  .card-cta, .pack-buy-btn, .subscription-cta, .ref-share-primary,
  .submit-button, .resume-btn, .select-btn, .gift-btn,
  .btn-back, .btn-cancel, .btn-skip, .secondary,
  .ref-share-secondary, .modal-btn, .danger, .bubble-button {
    transition: none;
    transform: none !important;
  }
  .btn-next::after, .btn-publish::after, .btn-save::after,
  .confirm-btn::after, .continue-btn::after {
    transition: none;
  }
}
