/**
 * GetFriend Gen-Z Dark Mode Theme
 * Cyber-Minimalism / High-Contrast Dark Mode
 * Version: 3.0 Neon Noir
 */

/* ============================================
   ROOT CSS VARIABLES
   ============================================ */
:root {
  /* Core Colors */
  --bg-core: #020202;
  --bg-surface: rgba(20, 20, 20, 0.7);
  --bg-surface-solid: #141414;
  --bg-elevated: #1a1a1a;
  --bg-card: rgba(30, 30, 30, 0.8);
  
  /* Accent Colors */
  --accent-primary: #3E64FF;
  --accent-secondary: #00F5FF;
  --accent-tertiary: #FF007A;
  --accent-success: #00FF88;
  --accent-warning: #FFB800;
  
  /* Text Colors */
  --text-high: #FFFFFF;
  --text-medium: #A1A1AA;
  --text-dim: #71717A;
  --text-muted: #52525B;
  
  /* Neon Glow Effects */
  --neon-glow-blue: 0 0 20px rgba(62, 100, 255, 0.4);
  --neon-glow-cyan: 0 0 20px rgba(0, 245, 255, 0.4);
  --neon-glow-pink: 0 0 20px rgba(255, 0, 122, 0.4);
  --neon-glow-subtle: 0 0 10px rgba(62, 100, 255, 0.2);
  
  /* Glassmorphism */
  --glass-bg: rgba(20, 20, 20, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-blur: blur(12px) saturate(180%);
  --glass-blur-heavy: blur(20px) saturate(200%);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Typography */
  --font-display: 'Lexend Mega', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-tooltip: 400;
  --z-toast: 500;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-core);
  color: var(--text-high);
}

/* Global Heading Styles - Consistent across all pages */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-high);
}

h1 {
  font-size: 2.25rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.875rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.4;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.5;
}

h5, h6 {
  font-size: 1.125rem;
  line-height: 1.5;
}

/* Base HTML styles */
html {
  color: var(--text-high);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.font-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.05em;
}

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

.font-mono {
  font-family: var(--font-mono);
}

/* Headlines with reveal animation base */
.headline-reveal {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

/* Kinetic Text */
.kinetic-text {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--text-high) 0%, var(--accent-secondary) 50%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   GLASSMORPHISM UTILITIES
   ============================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
}

.glass-heavy {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: var(--glass-border);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-xl);
}

/* ============================================
   NEON GLOW UTILITIES
   ============================================ */
.neon-glow {
  box-shadow: var(--neon-glow-blue);
}

.neon-glow-cyan {
  box-shadow: var(--neon-glow-cyan);
}

.neon-glow-pink {
  box-shadow: var(--neon-glow-pink);
}

.neon-text {
  text-shadow: 0 0 10px rgba(62, 100, 255, 0.5),
               0 0 20px rgba(62, 100, 255, 0.3),
               0 0 30px rgba(62, 100, 255, 0.2);
}

.neon-text-cyan {
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.5),
               0 0 20px rgba(0, 245, 255, 0.3),
               0 0 30px rgba(0, 245, 255, 0.2);
}

.neon-border {
  border: 1px solid rgba(62, 100, 255, 0.5);
  box-shadow: 0 0 10px rgba(62, 100, 255, 0.2),
              inset 0 0 10px rgba(62, 100, 255, 0.1);
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn-gen-z {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-gen-z::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-gen-z:hover::before {
  opacity: 1;
}

.btn-gen-z:active {
  transform: scale(0.95);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #5a7fff 100%);
  color: var(--text-high);
  box-shadow: var(--neon-glow-subtle);
}

.btn-primary:hover {
  box-shadow: var(--neon-glow-blue);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-high);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--neon-glow-subtle);
}

.btn-liquid {
  background: transparent;
  color: var(--text-high);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-liquid::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  transition: height var(--transition-base);
  z-index: -1;
}

.btn-liquid:hover::after {
  height: 100%;
}

.btn-liquid:hover {
  border-color: transparent;
}

/* ============================================
   INPUT STYLES
   ============================================ */
.input-gen-z {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-high);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: all var(--transition-base);
  outline: none;
}

.input-gen-z::placeholder {
  color: var(--text-dim);
}

.input-gen-z:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(62, 100, 255, 0.2),
              var(--neon-glow-subtle);
}

.input-pill {
  border-radius: var(--radius-full);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ============================================
   CARD STYLES
   ============================================ */
.card-gen-z {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card-gen-z:hover {
  transform: translateY(-4px);
  box-shadow: var(--neon-glow-subtle);
  border-color: rgba(62, 100, 255, 0.3);
}

/* Bento Grid Card Sizes */
.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.bento-card-1x1 {
  grid-column: span 1;
  grid-row: span 1;
}

.bento-card-2x1 {
  grid-column: span 2;
  grid-row: span 1;
}

.bento-card-2x2 {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-card-1x2 {
  grid-column: span 1;
  grid-row: span 2;
}

/* ============================================
   BADGE STYLES
   ============================================ */
.badge-gen-z {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-verified {
  background: rgba(0, 255, 136, 0.15);
  color: var(--accent-success);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge-verified::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-success);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

.badge-price {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  color: var(--text-high);
  border: var(--glass-border);
  font-family: var(--font-mono);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0);
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-gen-z {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: 1rem 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease,
              backdrop-filter 0.3s ease,
              padding 0.3s ease;
  will-change: transform;
}

.nav-gen-z.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  padding: 0.75rem 0;
}

.nav-gen-z.hidden {
  transform: translateY(-100%);
}

/* Prevent content jump when navbar hides */
.nav-gen-z + * {
  margin-top: 0;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
}

.stagger-children.active > * {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.active > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.active > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.active > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.active > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children.active > *:nth-child(6) { transition-delay: 500ms; }
.stagger-children.active > *:nth-child(7) { transition-delay: 600ms; }
.stagger-children.active > *:nth-child(8) { transition-delay: 700ms; }

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface-solid) 0%,
    rgba(40, 40, 40, 0.8) 50%,
    var(--bg-surface-solid) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  background: var(--bg-surface-solid);
}

.skeleton-text {
  height: 1rem;
  margin: 0.75rem;
  background: var(--bg-surface-solid);
  border-radius: var(--radius-sm);
}

.skeleton-text.short {
  width: 60%;
}

/* ============================================
   PRICE CHIP
   ============================================ */
.price-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.price-chip .currency {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.price-chip .amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-high);
}

.price-chip .unit {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 32px;
  background: var(--bg-surface);
  border: var(--glass-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-base);
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  border-radius: 50%;
  transition: transform var(--transition-bounce);
  box-shadow: var(--neon-glow-subtle);
}

.theme-toggle.dark::before {
  transform: translateX(28px);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-radial {
  background: radial-gradient(ellipse at center, var(--bg-elevated) 0%, var(--bg-core) 70%);
}

.border-glow {
  border: 1px solid rgba(62, 100, 255, 0.3);
  box-shadow: 0 0 20px rgba(62, 100, 255, 0.1);
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ============================================
   PROFILE PAGE STYLES
   ============================================ */

/* Profile Header Dynamic */
.profile-header-dynamic {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-header-dynamic .profile-image {
  position: relative;
  z-index: 10;
}

.profile-header-dynamic .profile-image img {
  transition: transform 0.3s ease;
}

.profile-header-dynamic .profile-image:hover img {
  transform: scale(1.05);
}

/* Price Chip */
.price-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-family: var(--font-mono);
  color: var(--text-high);
}

.price-chip .currency {
  font-size: 0.875rem;
  color: var(--accent-secondary);
  font-weight: 500;
}

.price-chip .amount {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.price-chip .unit {
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* Snap Scroll */
.snap-x {
  scroll-snap-type: x mandatory;
}

.snap-start {
  scroll-snap-align: start;
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-core);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-surface-solid);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
  :root {
    --radius-xl: 24px;
    --radius-lg: 16px;
  }
  
  .bento-card-2x2 {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .bento-card-2x1 {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .reveal,
  .reveal-scale,
  .stagger-children > * {
    opacity: 1;
    transform: none;
  }
}
