@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@600;700;800;900&display=swap');

/* ==============================================================================
   SEBUPLAYZ TIPS — PROFESSIONAL BLACK & PURPLE DESIGN SYSTEM
   Dominant: Deep Black (#09090b - #121216)
   Accent: Controlled Vibrant Purple (#7c3aed, #8b5cf6, #a855f7)
   Text: High-Contrast Off-White & Neutral Grays
   ============================================================================== */

:root {
  /* Surfaces & Canvas — Dominant Deep Black */
  --bg-primary: #08080a;
  --bg-surface: #111115;
  --bg-surface-elevated: #17171d;
  --bg-surface-subtle: #141419;
  --bg-input: #0c0c0f;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-purple: rgba(139, 92, 246, 0.35);
  --border-purple-subtle: rgba(139, 92, 246, 0.2);

  /* Purple Brand Palette (Accent Only) */
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;
  --purple-800: #6b21a8;
  --purple-900: #581c87;

  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-active: #6d28d9;
  --primary-glow: rgba(139, 92, 246, 0.2);
  --primary-subtle: rgba(139, 92, 246, 0.08);

  /* Functional Status Colors */
  --status-success: #10b981;
  --status-success-bg: rgba(16, 185, 129, 0.12);
  --status-error: #ef4444;
  --status-error-bg: rgba(239, 68, 68, 0.12);
  --status-warning: #f59e0b;

  /* Typography — High-Contrast Clean Grays */
  --text-main: #f4f4f5;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  /* Radii & Shadows (Restrained, Professional) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-card: 0 4px 24px -2px rgba(0, 0, 0, 0.75), 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(139, 92, 246, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 120%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

a {
  color: var(--purple-400);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--purple-200);
}

/* Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

.nav-brand .brand-badge {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-brand .brand-badge svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.back-home-link:hover {
  color: var(--purple-300);
  border-color: var(--border-purple);
  background: var(--bg-surface-elevated);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-main);
}

.nav-user img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  touch-action: manipulation;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #1e1e26;
  border-color: var(--border-medium);
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--purple-400);
  border: 1px solid var(--border-purple);
}

.btn-outline:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: #fff;
}

/* Hero Section (Inside Tip Card) */
.hero-creator {
  text-align: center;
  padding: 6px 0 22px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}

.creator-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
}

.creator-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.creator-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.creator-status {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: var(--status-success);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid var(--bg-surface);
}

.creator-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 3px;
  color: #ffffff;
}

.creator-handle {
  color: var(--purple-400);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.creator-bio {
  max-width: 100%;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Viewer Personal Stats Banner */
.viewer-stats-banner {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.viewer-stats-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewer-stats-rank {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.35);
}

/* Layout: Single-Column Vertical Stack */
.vertical-layout {
  max-width: 520px;
  margin: 32px auto 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pill-badge {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple-300);
  border: 1px solid var(--border-purple-subtle);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.sub-badge {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}

.card-header {
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

/* Tip Form */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 13px 15px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
  background: #0e0e12;
}

.amount-input-wrap {
  position: relative;
}

.currency-symbol {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--purple-400);
}

.amount-input {
  padding-left: 36px;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Preset Chips */
.preset-chips, .presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
  min-height: 40px;
  touch-action: manipulation;
}

.preset-chip:hover {
  background: rgba(139, 92, 246, 0.12);
  color: #fff;
  border-color: var(--border-purple);
  transform: translateY(-1px);
}

.preset-chip.active {
  background: rgba(139, 92, 246, 0.22);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
}

/* TTS Audio Indicator Notice */
.tts-notice {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: rgba(139, 92, 246, 0.08) !important;
  border: 1px solid var(--border-purple-subtle) !important;
  border-radius: var(--radius-md) !important;
  padding: 12px 16px !important;
  margin: 18px 0 20px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.tts-notice-icon {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  border-radius: 10px !important;
  background: rgba(139, 92, 246, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: var(--purple-300) !important;
  overflow: hidden !important;
}

.tts-notice-icon svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.tts-notice-text {
  font-size: 0.82rem !important;
  color: var(--purple-200) !important;
  line-height: 1.45 !important;
  flex: 1 !important;
}

.btn-submit {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 6px;
}

/* Pay Trust Badge */
.pay-trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
}

.pay-trust-badge svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0;
  color: var(--status-success);
}

/* Goal Progress */
.goal-inline-card {
  margin-bottom: 22px;
  padding: 16px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.goal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.goal-numbers {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.goal-numbers .current {
  color: var(--purple-400);
}

.goal-numbers .target {
  color: var(--text-dim);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.goal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 6px;
}

/* Leaderboard */
.leaderboard-scroll-container {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--purple-700) rgba(0, 0, 0, 0.4);
}

.leaderboard-scroll-container::-webkit-scrollbar {
  width: 5px;
}

.leaderboard-scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
}

.leaderboard-scroll-container::-webkit-scrollbar-thumb {
  background: var(--purple-700);
  border-radius: 999px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-medium);
  transform: translateX(2px);
}

.rank-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.rank-1 {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: var(--purple-300);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.rank-2 {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.rank-3 {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.rank-other {
  background: transparent;
  color: var(--text-dim);
}

.donor-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  margin-left: 10px;
  min-width: 0;
}

.donor-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donor-count {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.donor-amount {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--purple-300);
  flex-shrink: 0;
}

.leaderboard-partial-notice {
  text-align: center;
  padding: 10px 14px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px dashed var(--border-purple-subtle);
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-dim);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  stroke: var(--text-dim);
  margin-bottom: 10px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.88rem;
}

/* About Us Section */
.about-card {
  text-align: left;
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.about-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.about-feature-item {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-feature-item strong {
  color: var(--text-main);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.about-feature-item span {
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Contact Us Section */
.contact-card {
  text-align: left;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.contact-channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-channel-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-purple);
  background: var(--bg-surface-elevated);
}

.channel-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.discord-card .channel-icon-wrap {
  background: #5865f2;
}

.email-card .channel-icon-wrap {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
}

.channel-icon-wrap svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.channel-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.channel-title {
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
}

.channel-value {
  color: var(--text-dim);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==============================================================================
   HOMEPAGE LANDING SECTIONS
   ============================================================================== */

.landing-wrap {
  padding: 40px 0 60px;
}

.landing-hero {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 820px;
  margin: 0 auto;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border-purple);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--purple-300);
  margin-bottom: 22px;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.18);
}

.hero-pill-badge svg {
  width: 14px;
  height: 14px;
}

.hero-headline {
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: #ffffff;
}

.hero-headline .text-gradient {
  background: linear-gradient(135deg, #e9d5ff 0%, #c084fc 40%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtext {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto 32px;
}

.hero-cta-btns {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 42px;
}

.btn-hero {
  padding: 14px 30px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 54px;
  box-shadow: var(--shadow-card);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.trust-item svg {
  color: var(--primary);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Home Goal Banner */
.home-goal-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.home-goal-info {
  flex: 1;
  min-width: min(280px, 100%);
}

/* Features Grid */
.landing-section {
  margin-bottom: 56px;
}

.section-title-wrap {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 34px;
}

.section-title-wrap h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.section-title-wrap p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.features-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-box:hover {
  transform: translateY(-3px);
  border-color: var(--border-purple);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 24px rgba(139, 92, 246, 0.15);
}

.feature-box-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid var(--border-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-300);
  margin-bottom: 16px;
}

.feature-box-icon svg {
  width: 22px;
  height: 22px;
}

.feature-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Leaderboard Section for Homepage */
.home-leaderboard-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.leaderboard-cta-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(109, 40, 217, 0.06) 100%);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.leaderboard-cta-text {
  font-weight: 600;
  font-size: 0.92rem;
  color: #ffffff;
}

.home-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .home-split-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 540px) {
  .vertical-layout {
    padding: 0 12px;
    margin: 20px auto 40px;
  }
  .card {
    padding: 20px 16px;
  }
  .preset-chips, .presets-grid {
    gap: 6px;
  }
  .preset-chip {
    padding: 8px 2px;
    font-size: 0.82rem;
  }
}

/* ==============================================================================
   FOOTER (STRICT FLEX-COLUMN, ZERO OVERLAPPING)
   ============================================================================== */

.footer {
  text-align: center;
  padding: 48px 24px 60px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 50px;
  clear: both;
}

.footer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.footer-policy-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 600px;
  margin: 0;
}

.footer-policy-note a {
  color: var(--text-muted);
  text-decoration: underline;
}

.footer-policy-note a:hover {
  color: var(--purple-300);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  margin: 4px 0 0;
}

.footer-links a {
  color: var(--text-dim);
}

.footer-links a:hover {
  color: var(--purple-300);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.35s ease forwards;
}

/* ==============================================================================
   MOBILE RESPONSIVENESS & QUALITY PASS
   ============================================================================== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Kill the 300ms tap delay / double-tap zoom on interactive elements */
a, button, [role="button"] {
  touch-action: manipulation;
}

a {
  -webkit-tap-highlight-color: rgba(139, 92, 246, 0.15);
}

/* Focus ring for keyboard / assistive-tech users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.btn:focus-visible,
.preset-chip:focus-visible,
.tab-btn:focus-visible,
.oauth-btn:focus-visible {
  outline: 2px solid var(--purple-400);
  outline-offset: 2px;
}

/* Spinner (used for submit/loading states) */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

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

/* Safe-area insets (notch / home indicator) — requires viewport-fit=cover in meta */
body {
  padding-top: env(safe-area-inset-top);
}

.container {
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

.vertical-layout {
  margin-bottom: calc(48px + env(safe-area-inset-bottom));
}

.footer {
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
}

/* Mobile layout tuning */
@media (max-width: 820px) {
  .navbar {
    flex-wrap: wrap;
  }
  .btn {
    min-height: 46px;
  }
  .form-control {
    font-size: 1rem; /* ≥16px prevents iOS focus-zoom */
  }
  .landing-hero {
    padding: 32px 0 24px;
  }
  .hero-subtext {
    font-size: 1rem;
  }
  .home-goal-banner {
    padding: 20px;
  }
  .home-goal-info {
    min-width: 0;
  }
  .creator-title {
    font-size: 1.6rem;
  }
  .login-card {
    margin: 24px auto;
  }
}

@media (max-width: 560px) {
  .navbar {
    row-gap: 12px;
  }
  .nav-brand {
    font-size: 1.1rem;
  }
  .nav-brand .brand-badge {
    width: 32px;
    height: 32px;
  }
  .nav-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .nav-actions .btn {
    flex: 1;
  }
  .nav-actions .nav-user {
    flex: 1;
    justify-content: center;
    text-align: center;
    min-width: 0;
  }
  .nav-actions .nav-user img {
    width: 24px;
    height: 24px;
  }
  .hero-headline {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }
  .hero-cta-btns .btn-hero {
    width: 100%;
  }
  .section-title-wrap h2 {
    font-size: 1.6rem;
  }
  .trust-strip {
    padding: 14px;
  }
  .trust-strip .trust-item {
    font-size: 0.8rem;
  }
  .home-goal-banner .btn {
    width: 100%;
  }
  .leaderboard-cta-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .leaderboard-cta-banner .btn {
    width: 100%;
  }
  .footer-links {
    gap: 6px 12px;
  }
  .footer-links a {
    padding: 10px 6px;
    line-height: 1.4;
  }
}
