/* Firefly Website Styles */
/* https://fireflycore.xyz */

/* ===== CSS Variables ===== */
:root {
  --color-bg-primary: #1a1a2e;
  --color-bg-secondary: #16213e;
  --color-bg-tertiary: #0f3460;
  --color-accent-primary: #ffaa40;
  --color-accent-secondary: #ffc060;
  --color-text-primary: #ffffff;
  --color-text-secondary: #a0a0a0;
  --color-text-muted: #555555;
  --color-card-bg: rgba(255, 255, 255, 0.05);
  --color-card-border: rgba(255, 255, 255, 0.1);
  --gradient-primary: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
  --gradient-bg: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 50%, var(--color-bg-tertiary) 100%);
  --font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --border-radius-sm: 0.5rem;
  --border-radius-md: 0.75rem;
  --border-radius-lg: 1rem;
  --border-radius-full: 3.125rem;
  --shadow-sm: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.2);
  --shadow-md: 0 0.25rem 1rem rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 0.625rem 1.875rem rgba(255, 180, 80, 0.25);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Spacing scale (8px base) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Use height: 100% so body's percentage min-height has a reference */
  height: 100%;
  background-color: var(--color-bg-primary);
  background-image: var(--gradient-bg);
  background-attachment: scroll;
  background-size: cover;
  scroll-behavior: smooth;
  /* Fluid base font size: scales smoothly from 14px to 16px */
  font-size: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);
  /* Hide scrollbar while keeping scroll functionality */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

body {
  /* Sticky footer: body fills at minimum 100% of viewport */
  min-height: 100%;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--color-text-primary);
  line-height: 1.6;
  background-color: var(--color-bg-primary);
  background-image: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Prevent layout shifts on zoom */
  overflow-x: hidden;
  /* Flexbox layout to push footer to bottom */
  display: flex;
  flex-direction: column;
}

/* Main content area fills available space - sticky footer pattern */
body > .section:first-of-type,
body > main,
body > .hero,
body > .legal-page,
body > .docs-layout,
body > .page-container,
body > .account-container,
body > .dashboard-layout,
body > .admin-layout,
body > .checkout-container,
body > .store-page,
body > .community-page {
  flex: 1 0 auto;
}

/* Fixed nav doesn't participate in flex layout */
body > .nav {
  flex-shrink: 0;
}

/* Prevent image dragging */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  draggable: false;
}

code {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

a {
  color: var(--color-accent-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-primary);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Layout ===== */
.container {
  max-width: 75rem;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

.container-sm {
  max-width: 50rem;
}

.container-xs {
  max-width: 37.5rem;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  /* Extend into safe area with padding to keep content below notch */
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(0.625rem);
  -webkit-backdrop-filter: blur(0.625rem);
  border-bottom: 1px solid var(--color-card-border);
}

.nav-inner {
  max-width: 75rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-brand {
  position: fixed;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.nav-brand img {
  width: 2.25rem;
  height: 2.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

.nav-cta {
  color: #7289da !important;
  font-weight: 600;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-cta:hover {
  color: #99aaf5 !important;
  text-shadow: 0 0 12px rgba(114, 137, 218, 0.5);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  position: absolute;
  right: 0;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6),
              opacity 0.2s ease;
  transform-origin: center;
}

/* Hamburger to X animation */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== Hide/Show Header on Scroll ===== */
.nav {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
}

/* Hidden state - slides up out of view on scroll down */
.nav.nav-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

/* Visible state - slides back in on scroll up */
.nav.nav-visible {
  transform: translateY(0);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.hero-logo {
  width: 180px;
  height: 180px;
  margin-bottom: 16px;
  animation: glow 2s ease-in-out infinite alternate;
  object-fit: contain;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 20px var(--color-accent-primary)); }
  to { filter: drop-shadow(0 0 40px var(--color-accent-secondary)); }
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  font-weight: 400;
}

.hero-status {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255, 180, 80, 0.1);
  border: 2px solid var(--color-accent-primary);
  border-radius: var(--border-radius-full);
  font-size: 1rem;
  color: var(--color-accent-secondary);
  margin-bottom: 24px;
  font-weight: 500;
}

/* ===== Features Grid ===== */
.features {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}

.feature-tag {
  background: var(--color-card-bg);
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--gradient-primary);
  color: var(--color-text-primary);
  text-decoration: none;
  border-radius: var(--border-radius-full);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              filter 0.15s ease;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  position: relative;
  box-shadow: 0 4px 15px rgba(255, 180, 80, 0.25);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 180, 80, 0.35);
  color: var(--color-text-primary);
}

.btn:active {
  transform: scale(0.95) translateY(0);
  box-shadow: 0 2px 8px rgba(255, 180, 80, 0.3);
  filter: brightness(0.95);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.btn-secondary {
  background: var(--color-card-bg);
  border: 2px solid var(--color-card-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

.btn-secondary:active {
  transform: scale(0.95) translateY(0);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 16px 48px;
  font-size: 1.1rem;
}

/* Discord Login Button - Consistent across site */
.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #ffaa40, #ffc060);
  border: none;
  border-radius: 4px;
  color: #1a1a2e;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.discord-btn:hover {
  box-shadow: 0 4px 16px rgba(255, 180, 80, 0.4);
  transform: translateY(-2px);
}

.discord-btn:active {
  transform: translateY(0);
}

.discord-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.discord-btn.discord-btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  gap: 12px;
}

.discord-btn.discord-btn-lg svg {
  width: 24px;
  height: 24px;
}

.beta-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 6px 4px;
  border-radius: 4px;
  line-height: 1;
  text-box-trim: both;
  text-box-edge: cap alphabetic;
}

/* ===== Section Styles ===== */
.section {
  padding: 80px 20px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ===== Cards ===== */
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}

/* ===== Pricing Cards ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--border-radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--color-accent-primary);
  background: rgba(255, 180, 80, 0.05);
}

.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: var(--color-text-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: var(--border-radius-full);
  letter-spacing: 0.5px;
}

.pricing-tier {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  -webkit-text-fill-color: var(--color-text-secondary);
}

.pricing-yearly {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-card-border);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features .check {
  color: #4ade80;
  font-weight: bold;
}

.pricing-features .x {
  color: #f87171;
}

.pricing-member-cap {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-card-border);
}

/* Firefly Green - Bioluminescent glow */
:root {
  --firefly-green: #39ff14;
  --firefly-green-glow: rgba(57, 255, 20, 0.4);
  --firefly-green-subtle: rgba(57, 255, 20, 0.15);
}

/* Plus & Ultra buttons - Firefly green glow */
.pricing-card .btn-firefly {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.1), rgba(57, 255, 20, 0.05));
  border: 2px solid rgba(57, 255, 20, 0.4);
  color: var(--color-text-primary);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              background 0.2s ease,
              border-color 0.2s ease;
  box-shadow: 0 4px 15px rgba(57, 255, 20, 0.15);
}

.pricing-card .btn-firefly::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(57, 255, 20, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pricing-card .btn-firefly:hover {
  border-color: var(--firefly-green);
  box-shadow: 0 0 20px var(--firefly-green-glow), 0 0 40px rgba(57, 255, 20, 0.2);
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.2), rgba(57, 255, 20, 0.1));
}

.pricing-card .btn-firefly:hover::before {
  opacity: 1;
}

.pricing-card .btn-firefly:active {
  transform: scale(0.95) translateY(0);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.25), rgba(57, 255, 20, 0.15));
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Pro button - Signature orange with enhanced effects */
.pricing-card.featured .btn-pro {
  background: var(--gradient-primary);
  border: none;
  position: relative;
  animation: proPulse 2s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(255, 180, 80, 0.3);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease;
}

.pricing-card.featured .btn-pro:hover {
  box-shadow: 0 0 25px rgba(255, 180, 80, 0.5), 0 0 50px rgba(255, 180, 80, 0.3);
  transform: translateY(-3px) scale(1.02);
  animation: none;
}

.pricing-card.featured .btn-pro:active {
  transform: scale(0.95) translateY(0);
  box-shadow: 0 0 20px rgba(255, 180, 80, 0.5);
  animation: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

@keyframes proPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 180, 80, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(255, 180, 80, 0.5), 0 0 35px rgba(255, 180, 80, 0.2);
  }
}

/* Enhanced "Most Popular" badge for Pro */
.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: var(--color-text-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: var(--border-radius-full);
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 180, 80, 0.4);
  animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 180, 80, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 180, 80, 0.6), 0 0 30px rgba(255, 180, 80, 0.3);
  }
}

/* Enterprise card - Firefly green theme */
.pricing-card.enterprise {
  border-color: var(--firefly-green);
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.05), transparent);
  position: relative;
}

.pricing-card.enterprise::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, var(--firefly-green), transparent 50%);
  z-index: -1;
  opacity: 0.3;
}

/* Ultra and Enterprise cards - same text color as others for unity */

.pricing-card.enterprise .btn-enterprise {
  background: linear-gradient(135deg, rgba(150, 150, 170, 0.15), rgba(150, 150, 170, 0.05));
  border: 2px solid rgba(160, 160, 180, 0.5);
  color: var(--color-text-primary);
  box-shadow: 0 4px 15px rgba(100, 100, 120, 0.15);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              background 0.2s ease;
}

.pricing-card.enterprise .btn-enterprise:hover {
  background: linear-gradient(135deg, rgba(150, 150, 170, 0.25), rgba(150, 150, 170, 0.1));
  box-shadow: 0 0 20px rgba(150, 150, 180, 0.2), 0 0 40px rgba(100, 100, 120, 0.1);
  transform: translateY(-3px);
}

.pricing-card.enterprise .btn-enterprise:active {
  transform: scale(0.95) translateY(0);
  box-shadow: 0 0 15px rgba(150, 150, 170, 0.3);
  background: linear-gradient(135deg, rgba(150, 150, 170, 0.3), rgba(150, 150, 170, 0.15));
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* ===== Feature Comparison Table ===== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 48px 0;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid var(--color-card-border);
}

.comparison-table th {
  background: var(--color-card-bg);
  font-weight: 600;
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.comparison-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-category {
  background: var(--color-bg-secondary) !important;
  font-weight: 700 !important;
  color: var(--color-accent-secondary);
}

/* ===== Gift Section ===== */
.gift-section {
  background: var(--color-card-bg);
  border-radius: var(--border-radius-lg);
  padding: 48px;
  text-align: center;
  margin: 48px 0;
  border: 1px solid var(--color-card-border);
}

.gift-section h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.gift-section p {
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Legal Pages ===== */
.legal-page {
  padding: 120px 20px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-page .last-updated {
  color: var(--color-text-muted);
  margin-bottom: 48px;
}

.legal-page h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--color-accent-secondary);
}

.legal-page p {
  margin-bottom: 16px;
  color: var(--color-text-secondary);
}

.legal-page ul {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--color-text-secondary);
}

.legal-page li {
  margin-bottom: 8px;
}

/* ===== Footer ===== */
.footer {
  margin-top: auto;
  flex-shrink: 0;
  padding: 48px 20px;
  padding-bottom: max(48px, env(safe-area-inset-bottom));
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  border-top: 1px solid var(--color-card-border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.footer-copyright {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-inner {
    /* Don't use space-between - it conflicts with margin-left: auto on avatar */
    justify-content: flex-start;
  }

  .nav-brand {
    position: static;
    left: auto;
  }

  .nav-toggle {
    position: static;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    flex-direction: column;
    background: #1a1a2e;
    padding: 20px 24px 24px;
    gap: 8px;
    border-bottom: 1px solid var(--color-card-border);
    justify-content: flex-start;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links.active {
    display: flex;
    animation: menuSlideIn 0.3s ease forwards;
  }

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

  .nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    animation: menuItemSlide 0.3s ease forwards;
  }

  .nav-links.active li:nth-child(1) { animation-delay: 0.05s; }
  .nav-links.active li:nth-child(2) { animation-delay: 0.1s; }
  .nav-links.active li:nth-child(3) { animation-delay: 0.15s; }
  .nav-links.active li:nth-child(4) { animation-delay: 0.2s; }
  .nav-links.active li:nth-child(5) { animation-delay: 0.25s; }
  .nav-links.active li:nth-child(6) { animation-delay: 0.3s; }
  .nav-links.active li:nth-child(7) { animation-delay: 0.35s; }

  @keyframes menuItemSlide {
    from {
      opacity: 0;
      transform: translateX(20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.05rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .comparison-table {
    font-size: 0.8rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 8px;
  }

  .section {
    padding: 60px 16px;
  }

  .section-title {
    font-size: 2rem;
  }

  .gift-section {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 60px 16px;
  }

  .hero-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-tagline {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .hero-status {
    padding: 8px 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .features {
    gap: 8px;
    margin-bottom: 24px;
  }

  .feature-tag {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .footer-links {
    gap: 16px;
  }

  .legal-page {
    padding: 100px 16px 60px;
  }

  .legal-page h1 {
    font-size: 2rem;
  }
}

@media (max-width: 360px) {
  .hero-logo {
    width: 100px;
    height: 100px;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .feature-tag {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* ===== Large Desktop - More Breathing Room ===== */
@media (min-width: 1280px) {
  .container {
    max-width: 1400px;
    padding: 0 60px;
  }

  .section {
    padding: 100px 60px;
  }

  .pricing-grid {
    gap: 32px;
  }

  .section-title {
    font-size: 3rem;
  }

  .section-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-tagline {
    font-size: 1.2rem;
  }

  .gift-section {
    padding: 56px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 20px;
  }
}

/* ===== Tablet Landscape ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .section {
    padding: 64px 24px;
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .pricing-card {
    padding: 28px 20px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .gift-section {
    padding: 40px 32px;
  }
}

/* ===== Premium Link Styling - Subtle Glow Animation ===== */
.nav-premium {
  color: #ffaa40 !important;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 170, 64, 0.3);
  animation: premiumGlow 3s ease-in-out infinite;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-premium:hover {
  color: #ffc060 !important;
  text-shadow: 0 0 16px rgba(255, 170, 64, 0.6);
}

@keyframes premiumGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 170, 64, 0.3); }
  50% { text-shadow: 0 0 14px rgba(255, 170, 64, 0.5); }
}

/* Store link - Subtle Glow Animation */
.nav-store {
  color: #39ff14 !important;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
  animation: storeGlow 3s ease-in-out infinite;
  animation-delay: 1.5s;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-store:hover {
  color: #6fff50 !important;
  text-shadow: 0 0 16px rgba(57, 255, 20, 0.6);
}

@keyframes storeGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(57, 255, 20, 0.3); }
  50% { text-shadow: 0 0 14px rgba(57, 255, 20, 0.5); }
}

/* Admin nav link - only visible to logged-in admins */
.nav-admin {
  color: #ed4245 !important;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(237, 66, 69, 0.3);
  animation: adminGlow 3s ease-in-out infinite;
  animation-delay: 2s;
}

.nav-admin:hover {
  color: #ff6b6b !important;
  text-shadow: 0 0 16px rgba(237, 66, 69, 0.6);
}

@keyframes adminGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(237, 66, 69, 0.3); }
  50% { text-shadow: 0 0 14px rgba(237, 66, 69, 0.5); }
}

/* Dashboard nav link - bright white, higher opacity than other nav items */
.nav-dashboard {
  color: #ffffff !important;
  font-weight: 600;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.nav-dashboard:hover {
  color: #ffffff !important;
  opacity: 0.85;
}

/* ===== Auth Nav - Login Link ===== */
.nav-login {
  color: #c8e650 !important;
  font-weight: 600;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-login:hover {
  color: #e4ff70 !important;
  text-shadow: 0 0 14px rgba(200, 230, 80, 0.6);
}

/* User profile link - fixed to right edge of nav */
.nav-user {
  position: fixed;
  right: 1.5rem;
  top: 8px;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-user:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(200, 230, 80, 0.4);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.nav-user-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile user avatar - separate element outside nav-links */
/* Hidden on desktop, only visible on mobile */
#mobileUserAvatar {
  display: none;
}

.nav-user-mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Hide desktop nav-user on mobile (it's inside hidden nav-links anyway) */
  .nav-user {
    display: none !important;
  }

  /* Mobile user avatar container - positioned next to hamburger */
  #mobileUserAvatar {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 12px;
    /* Ensure it's a flex item and visible */
    flex-shrink: 0;
  }

  /* Mobile user avatar link - grey circle with avatar */
  .nav-user-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 4px;
    background: var(--color-text-muted);
    border-radius: 50%;
    text-decoration: none;
    /* Ensure minimum size even if image fails */
    min-width: 36px;
    min-height: 36px;
  }
  .nav-user-mobile:hover {
    background: var(--color-text-secondary);
  }
  .nav-user-mobile .nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
  }
}

/* Hero CTA button - Shine sweep effect */
.hero .btn {
  position: relative;
  background: linear-gradient(135deg, #ffaa40, #ffc060);
  border: none;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

/* Shine sweep effect */
.hero .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 60%,
    transparent 100%
  );
  transition: left 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.hero .btn:hover::before {
  left: 100%;
}

.hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 180, 80, 0.4);
}

.hero .btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(255, 180, 80, 0.3);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero .btn::before {
    display: none;
  }

  .hero .btn:hover {
    transform: none;
  }
}

.premium-hint {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(57, 255, 20, 0.6);
  text-decoration: none;
  transition: all 0.3s ease;
}

.premium-hint:hover {
  color: rgba(57, 255, 20, 0.85);
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

.premium-badge {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-accent-secondary);
  margin-left: 8px;
  opacity: 0.8;
}

/* ===== Page Transitions ===== */
.page-transition {
  position: fixed;
  /* Extend beyond safe areas using negative insets */
  top: calc(-1 * env(safe-area-inset-top, 0px));
  left: calc(-1 * env(safe-area-inset-left, 0px));
  right: calc(-1 * env(safe-area-inset-right, 0px));
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  /* Solid signature green background */
  background: #0d1a0d;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  /* Add padding for safe areas */
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* Multiple height fallbacks for iOS compatibility */
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  min-height: -webkit-fill-available;
  /* Force GPU layer for smoother rendering on iOS */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* Hidden by default - use visibility only, no opacity fade on background */
  visibility: hidden;
}

.page-transition.active {
  visibility: visible;
  pointer-events: all;
}

.page-transition-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.page-transition.active .page-transition-container {
  opacity: 1;
  transform: scale(1);
}

/* Glow ring behind the logo */
.page-transition-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 100, 0.3) 0%, rgba(255, 180, 80, 0.1) 40%, transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-transition.active .page-transition-glow {
  opacity: 1;
  transform: scale(1);
  animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

/* Main firefly logo */
.page-transition-logo {
  position: relative;
  width: 200px;
  height: auto;
  opacity: 0;
  transition: opacity 0.35s ease 0.1s;
  filter: drop-shadow(0 0 20px rgba(255, 200, 100, 0.6));
  z-index: 1;
}

.page-transition.active .page-transition-logo {
  opacity: 1;
  animation: fireflyGlow 1.5s ease-in-out infinite;
}

@keyframes fireflyGlow {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(255, 200, 100, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 35px rgba(255, 200, 100, 0.9)) drop-shadow(0 0 50px rgba(255, 180, 80, 0.4));
  }
}

/* Particle ring effect */
.page-transition-ring {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 2px solid rgba(255, 200, 100, 0.4);
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
}

.page-transition.active .page-transition-ring {
  animation: ringExpand 2.4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

.page-transition.active .page-transition-ring:nth-child(2) {
  animation-delay: 0.8s;
}

.page-transition.active .page-transition-ring:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes ringExpand {
  0% {
    transform: scale(1);
    opacity: 0;
  }
  5% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.25;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Page content entrance */
.page-content {
  animation: pageEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Staggered element animations */
.page-content .nav {
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

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

.page-content .hero,
.page-content .section:first-of-type {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

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


/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .page-transition-container {
    transition: none;
  }

  .page-transition-logo,
  .page-transition-glow,
  .page-transition-ring {
    animation: none !important;
    transition: none;
  }

  .page-transition.active .page-transition-container {
    opacity: 1;
    transform: none;
  }

  .page-transition.active .page-transition-logo {
    opacity: 1;
  }

  .page-transition.active .page-transition-glow {
    opacity: 1;
    transform: scale(1);
  }

  .page-transition-ring {
    display: none;
  }

  .page-content,
  .page-content .nav,
  .page-content .hero,
  .page-content .section:first-of-type {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* ===== Disable hover effects on touch devices ===== */
@media (hover: none) {
  a:hover,
  .btn:hover,
  .btn-secondary:hover,
  .discord-btn:hover,
  .nav-links a:hover,
  .nav-cta:hover,
  .nav-premium:hover,
  .nav-store:hover,
  .nav-admin:hover,
  .pricing-card .btn-firefly:hover,
  .pricing-card.featured .btn-pro:hover,
  .pricing-card.enterprise .btn-enterprise:hover,
  .hero .btn:hover,
  .premium-hint:hover,
  .comparison-table tr:hover {
    transform: none;
    box-shadow: inherit;
    background: inherit;
    color: inherit;
    border-color: inherit;
    opacity: inherit;
  }

  .pricing-card .btn-firefly:hover::before,
  .hero .btn:hover::before {
    opacity: 0;
  }
}
