/* ProofOfGains - Premium SaaS Aesthetic */

:root {
  /* Core Palette - Dark Theme */
  --bg-main: #0a0a0c;
  --bg-secondary: #121216;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  
  /* Accents */
  --accent: #6366f1; /* Indigo */
  --accent-glow: rgba(99, 102, 241, 0.4);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --danger: #ef4444;
  
  /* Gradients */
  --gradient-text: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --gradient-2: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  
  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Animation */
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 25%);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: 4rem;
  line-height: 1.1;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

p {
  color: var(--text-secondary);
}

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

/* Utilities */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent { color: var(--accent); }
.text-center { text-align: center; }

/* Components: Navbar - Premium Linear/Vercel Style */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px; /* Slightly shorter, cleaner */
  z-index: 1000;
  background: rgba(10, 10, 12, 0); /* Start transparent */
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(12px);
  height: 64px;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Gradient Border at bottom */
.nav-border-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.0) 20%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.0) 80%, 
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.navbar.scrolled .nav-border-gradient {
  opacity: 1;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1001; /* Above mobile menu if needed */
  text-decoration: none;
}

.logo-icon {
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.logo-text {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Centered Navigation */
.nav-links-center {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 99px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Auth Buttons */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-btn-ghost {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-btn-ghost:hover {
  color: var(--text-primary);
}

.nav-btn-primary {
  font-size: 0.9rem;
  color: var(--bg-main);
  background: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.nav-btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
  margin-left: auto;
  margin-right: auto;
}

.mobile-menu-toggle:hover .hamburger-line {
  background-color: var(--text-primary);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-main);
  z-index: 999;
  padding-top: 80px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  pointer-events: none;
}

.mobile-menu-overlay.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1.5rem;
}

.mobile-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.mobile-link:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.mobile-auth {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Helper for scroll lock */
body.menu-open {
  overflow: hidden;
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle.active .top {
  transform: translateY(4px) rotate(45deg);
}

.mobile-menu-toggle.active .bottom {
  transform: translateY(-4px) rotate(-45deg);
}


/* Components: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease-out);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 12px;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-main);
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background: #e2e2e2;
  transform: translateY(-2px);
}

.btn-glass {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.glow-effect {
  position: relative;
}

.glow-effect::after {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: inherit;
  filter: blur(15px);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
  border-radius: inherit;
}

.btn-primary.glow-effect:hover::after {
  background: rgba(255,255,255,0.4);
  opacity: 0.5;
}

/* Components: Glass Cards */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
}

.glass-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* Hero Section */
.hero {
  padding-top: calc(var(--nav-height) + 6rem);
  padding-bottom: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 90vh;
}

.hero-content {
  max-width: 800px;
  z-index: 2;
  margin-bottom: 4rem;
  padding: 0 1rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: #a5b4fc;
  border-radius: 50%;
  box-shadow: 0 0 10px #a5b4fc;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 1.5rem auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-glass);
}

/* Hero Visual Card */
.hero-visual {
  perspective: 1000px;
  margin-top: -2rem;
}

.hero-card {
  width: 340px;
  background: rgba(18, 18, 22, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: rotateX(10deg) rotateY(-5deg) rotateZ(2deg);
  transition: transform 0.5s ease;
}

.hero-card:hover {
  transform: rotateX(0) rotateY(0) rotateZ(0) translateY(-10px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.user-info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
}

.name { font-size: 0.9rem; font-weight: 600; }
.status { font-size: 0.75rem; color: var(--text-secondary); }

.verified-badge {
  font-size: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.metric { display: flex; flex-direction: column; }
.metric .label { font-size: 0.75rem; color: var(--text-tertiary); margin-bottom: 0.25rem; }
.metric .value { font-size: 1.25rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.metric .value.positive { color: var(--success); }

/* Chart Mini */
.chart-mini {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 40px;
}

.bar {
  width: 6px;
  background: var(--border-glass);
  border-radius: 2px;
}

.bar.active {
  background: var(--success);
  box-shadow: 0 0 10px var(--success-glow);
}

/* Ticker Section */
.logo-ticker-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  background: var(--bg-secondary);
  overflow: hidden;
}

.ticker-label {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.ticker-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.ticker-container::before, .ticker-container::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 150px;
  z-index: 2;
}

.ticker-container::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary), transparent);
}

.ticker-container::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary), transparent);
}

.ticker-track {
  display: flex;
  gap: 6rem;
  width: max-content;
  animation: scroll 30s linear infinite;
}

.ticker-item {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-secondary);
  opacity: 0.5;
  transition: opacity 0.3s;
}

.ticker-item:hover {
  opacity: 1;
  color: var(--text-primary);
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Features Section */
.features-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2.5rem;
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: var(--bg-glass-hover);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--border-glass);
}

.gradient-1 { background: var(--gradient-1); color: white; }
.gradient-2 { background: var(--gradient-2); color: white; }
.gradient-3 { background: var(--gradient-3); color: white; }

/* CTA Section */
.cta-section {
  padding: 6rem 2rem;
}

.cta-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-glass) 0%, rgba(0,0,0,0) 100%);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-glass);
  padding: 4rem 2rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.link-col h4 {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.link-col a {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.link-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* Page Containers */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.page-container.narrow {
  max-width: 800px;
}

.page-header {
  margin-bottom: 3rem;
  text-align: center;
}

/* Data Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 1.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.02);
}

.data-table td {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
}

/* Inputs & Forms */
.input-glass {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-glass);
  padding: 1rem;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1rem;
  transition: all 0.2s;
}

.input-glass:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.select-glass {
  background: var(--bg-main);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

.auth-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 3rem;
  border-radius: var(--radius-lg);
}

.auth-subtitle {
  margin-bottom: 2rem;
}

.input-group {
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.btn-block {
  width: 100%;
  margin-top: 1rem;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Controls Bar / Filters */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.filters {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Form Container */
.form-container {
  padding: 2rem;
  border-radius: var(--radius-md);
  margin-top: 2rem;
}

.form-container.hidden {
  display: none;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.form-header h3 {
  margin: 0;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--text-primary);
}

.form-actions {
  margin-top: 1.5rem;
}

.instruction-text {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Exchange Grid */
.exchange-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.exchange-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.exchange-card:hover, .exchange-card.selected {
  background: var(--bg-glass-hover);
  border-color: var(--accent);
}

.exchange-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

/* Dashboard Stats */
.stats-grid-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* Profile */
.profile-header {
  text-align: center;
  padding: 3rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.profile-avatar-lg {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--gradient-1);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-tertiary);
}

.empty-state p {
  margin: 0;
}

/* Dashboard Panels */
.glass-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.connections-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Badges Row */
.badges-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Utility: Margin Top */
.mt-4 {
  margin-top: 1rem;
}

/* Text Truncation */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Color Utilities */
.text-danger {
  color: var(--danger);
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) forwards;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.floating {
  animation: float 6s ease-in-out infinite;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotateX(10deg) rotateY(-5deg) rotateZ(2deg); }
  50% { transform: translateY(-15px) rotateX(10deg) rotateY(-5deg) rotateZ(2deg); }
}

/* =====================================================
   RESPONSIVE STYLES - Mobile First Approach
   ===================================================== */

/* Tablet Breakpoint - max-width: 768px */
@media (max-width: 768px) {
  /* Typography Scaling */
  h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.75rem;
  }

  /* Hide desktop navigation, show mobile toggle */
  .nav-links-center,
  .auth-buttons {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-container {
    padding: 0 1.25rem;
  }

  /* Hero Section */
  .hero {
    padding-top: calc(var(--nav-height) + 3rem);
    padding-bottom: 3rem;
    min-height: auto;
  }

  .hero-content {
    margin-bottom: 2rem;
    padding: 0 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin: 1rem auto 2rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
  }

  .hero-cta .btn {
    width: 100%;
    min-height: 48px; /* Touch-friendly */
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .stat-divider {
    display: none;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  /* Hero Card */
  .hero-visual {
    width: 100%;
    padding: 0 1rem;
  }

  .hero-card {
    width: 100%;
    max-width: 320px;
    margin: 1rem auto 0;
    transform: none;
  }

  .hero-card:hover {
    transform: translateY(-5px);
  }

  /* Floating animation adjustment */
  .floating {
    animation: floatMobile 6s ease-in-out infinite;
  }

  @keyframes floatMobile {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  /* Badge Pill */
  .badge-pill {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    margin-bottom: 1.5rem;
  }

  /* Ticker Section */
  .logo-ticker-section {
    padding: 2rem 0;
  }

  .ticker-track {
    gap: 3rem;
  }

  .ticker-item {
    font-size: 1.1rem;
  }

  .ticker-container::before,
  .ticker-container::after {
    width: 60px;
  }

  /* Features Section */
  .features-section {
    padding: 4rem 1.25rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.75rem;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .feature-card p {
    font-size: 0.9rem;
  }

  /* CTA Section */
  .cta-section {
    padding: 3rem 1.25rem;
  }

  .cta-content {
    padding: 3rem 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cta-buttons .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Footer */
  .footer {
    padding: 3rem 1.25rem 1.5rem;
  }

  .footer-container {
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 2rem;
    width: 100%;
  }

  .footer-col {
    text-align: center;
  }

  .footer-col p {
    font-size: 0.9rem;
  }

  .link-col {
    text-align: left;
  }

  /* Page Containers */
  .page-container {
    padding: 6rem 1.25rem 2rem;
  }

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

  .page-header p {
    font-size: 0.95rem;
  }

  /* Data Tables */
  .table-wrapper {
    margin: 0 -1.25rem;
    border-radius: 0;
  }

  .data-table th,
  .data-table td {
    padding: 0.875rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Hide less important columns on tablet */
  .data-table th:nth-child(5),
  .data-table td:nth-child(5),
  .data-table th:nth-child(6),
  .data-table td:nth-child(6) {
    display: none;
  }

  /* Auth Forms */
  .auth-container {
    padding: 1.25rem;
    min-height: 70vh;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-card h2 {
    font-size: 1.5rem;
  }

  /* Exchange Grid */
  .exchange-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .exchange-card {
    padding: 1.25rem;
    min-height: 100px; /* Touch target */
  }

  /* Stats Grid Dashboard */
  .stats-grid-dashboard {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1.25rem;
  }

  .stat-card .value {
    font-size: 1.5rem;
  }

  /* Profile */
  .profile-header {
    padding: 2rem 1.5rem;
  }

  .profile-avatar-lg {
    width: 80px;
    height: 80px;
  }

  /* Controls Bar */
  .controls-bar {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .filters {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .select-glass {
    width: 100%;
    min-height: 44px;
  }

  /* Buttons - Touch Friendly */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
    min-height: 48px;
  }

  /* Inputs - Touch Friendly */
  .input-glass {
    min-height: 48px;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* Form Container */
  .form-container {
    margin: 1.5rem 0;
    padding: 1.5rem;
  }

  /* Mobile Menu Overlay Improvements */
  .mobile-menu-overlay {
    padding-top: 70px;
  }

  .mobile-menu-content {
    padding: 1.5rem;
    gap: 1rem;
  }

  .mobile-link {
    font-size: 1.1rem;
    padding: 0.75rem 0;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .mobile-auth {
    margin-top: 1.5rem;
  }

  .mobile-auth .btn {
    min-height: 48px;
  }

  /* Dashboard Panels */
  .glass-panel {
    padding: 1.25rem;
  }

  .panel-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  .panel-header .btn-sm {
    width: 100%;
  }

  .dashboard-content {
    margin-top: 1.5rem;
  }

  /* Badges on Mobile */
  .badges-row {
    gap: 0.375rem;
  }

  /* Loading/Empty States */
  .loading-state,
  .empty-state {
    padding: 2rem 1rem;
  }
}

/* Phone Breakpoint - max-width: 480px */
@media (max-width: 480px) {
  /* Even smaller typography */
  h1 {
    font-size: 2rem;
    letter-spacing: -0.03em;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  /* Navbar adjustments */
  .navbar {
    height: 60px;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .logo-icon {
    width: 22px;
    height: 22px;
  }

  /* Hero tweaks */
  .hero {
    padding-top: calc(60px + 2rem);
    padding-bottom: 2rem;
  }

  .hero-content {
    padding: 0 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .hero-cta {
    padding: 0 0.5rem;
  }

  .badge-pill {
    font-size: 0.7rem;
  }

  /* Stats even smaller */
  .stat-number {
    font-size: 1.35rem;
  }

  /* Hero Card */
  .hero-card {
    padding: 1.25rem;
  }

  .hero-card .name {
    font-size: 0.85rem;
  }

  .hero-card .status {
    font-size: 0.7rem;
  }

  .hero-card .metric .value {
    font-size: 1.1rem;
  }

  .hero-card .metric .label {
    font-size: 0.65rem;
  }

  .avatar-circle {
    width: 36px;
    height: 36px;
  }

  /* Ticker even smaller */
  .ticker-item {
    font-size: 1rem;
  }

  .ticker-track {
    gap: 2rem;
  }

  .ticker-container::before,
  .ticker-container::after {
    width: 40px;
  }

  /* Features */
  .features-section {
    padding: 3rem 1rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .feature-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  /* CTA */
  .cta-content {
    padding: 2.5rem 1.25rem;
  }

  .cta-content h2 {
    font-size: 1.4rem;
  }

  .cta-content p {
    font-size: 0.9rem;
  }

  /* Footer */
  .footer {
    padding: 2rem 1rem 1rem;
  }

  .footer-bottom {
    font-size: 0.75rem;
    padding-top: 1.5rem;
  }

  /* Page Containers */
  .page-container {
    padding: 5rem 1rem 1.5rem;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  /* Tables - Show only essential columns */
  .data-table th:nth-child(4),
  .data-table td:nth-child(4),
  .data-table th:nth-child(7),
  .data-table td:nth-child(7) {
    display: none;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  /* Auth Forms */
  .auth-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-md);
  }

  .auth-card h2 {
    font-size: 1.35rem;
  }

  .auth-subtitle {
    font-size: 0.9rem;
  }

  /* Exchange Grid - Single column on very small screens */
  .exchange-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .exchange-card {
    padding: 1rem;
    min-height: 90px;
  }

  .exchange-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .exchange-card span {
    font-size: 0.85rem;
  }

  /* Stats Grid - Stack on very small */
  .stats-grid-dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card .label {
    font-size: 0.75rem;
  }

  .stat-card .value {
    font-size: 1.25rem;
  }

  /* Profile */
  .profile-header {
    padding: 1.5rem 1rem;
  }

  .profile-header h1 {
    font-size: 1.5rem;
  }

  .profile-avatar-lg {
    width: 70px;
    height: 70px;
  }

  /* Form Container */
  .form-container {
    padding: 1.25rem;
  }

  .form-header h3 {
    font-size: 1.1rem;
  }

  /* Controls Bar */
  .controls-bar {
    padding: 0.875rem;
  }

  /* Reduce animation intensity on mobile */
  .fade-in-up {
    transform: translateY(15px);
  }

  .scroll-reveal {
    transform: translateY(20px);
  }
}

/* =====================================================
   LEADERBOARD - Premium UI
   ===================================================== */

.leaderboard-page {
  min-height: 100vh;
}

.leaderboard-hero {
  padding: calc(var(--nav-height) + 4rem) 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.leaderboard-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.leaderboard-hero-content {
  position: relative;
  z-index: 1;
}

.leaderboard-hero h1 {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.leaderboard-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.leaderboard-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* Podium Section */
.podium-section {
  margin-bottom: 3rem;
}

.podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1.5rem;
  align-items: end;
  max-width: 900px;
  margin: 0 auto;
}

.podium-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.podium-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glass-hover);
}

.podium-1 {
  padding: 2.5rem 1.5rem 2rem;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, var(--bg-glass) 100%);
  border-color: rgba(255, 215, 0, 0.2);
}

.podium-2 {
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.05) 0%, var(--bg-glass) 100%);
  border-color: rgba(192, 192, 192, 0.15);
}

.podium-3 {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.05) 0%, var(--bg-glass) 100%);
  border-color: rgba(205, 127, 50, 0.15);
}

.podium-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.crown-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  animation: float-crown 3s ease-in-out infinite;
}

@keyframes float-crown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.podium-rank {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin: 0 auto 1rem;
}

.podium-rank.gold {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #1a1a1a;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.podium-rank.silver {
  background: linear-gradient(135deg, #E8E8E8 0%, #B8B8B8 100%);
  color: #1a1a1a;
  box-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
}

.podium-rank.bronze {
  background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
  color: white;
  box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}

.podium-avatar {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
}

.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 3px;
}

.avatar-ring.gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.avatar-ring.silver {
  background: linear-gradient(135deg, #E8E8E8, #B8B8B8);
}

.avatar-ring.bronze {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.podium-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.podium-roi {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.75rem;
}

.podium-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.meta-label {
  color: var(--text-tertiary);
  margin-right: 0.25rem;
}

.meta-divider {
  opacity: 0.3;
}

/* Controls Bar */
.leaderboard-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.controls-left, .controls-right {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-tabs {
  display: flex;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 4px;
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--text-primary);
  color: var(--bg-main);
}

.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 200px;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  width: 250px;
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

/* Leaderboard Table */
.leaderboard-table-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead {
  background: rgba(255, 255, 255, 0.02);
}

.leaderboard-table th {
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

.leaderboard-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.leaderboard-table th.sortable:hover {
  color: var(--text-primary);
}

.sort-icon {
  margin-left: 4px;
  opacity: 0.4;
  vertical-align: middle;
}

.leaderboard-table th.sortable.active .sort-icon {
  opacity: 1;
  color: var(--accent);
}

.leaderboard-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-secondary);
  vertical-align: middle;
}

.leaderboard-table tbody tr {
  transition: all 0.2s;
}

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

.leaderboard-table tbody tr:hover td {
  color: var(--text-primary);
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

/* Table Cell Styles */
.col-rank {
  width: 60px;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.85rem;
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1a1a1a;
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #E8E8E8, #B8B8B8);
  color: #1a1a1a;
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
  color: white;
}

.rank-badge.rank-default {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

.trader-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.trader-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

.trader-info {
  display: flex;
  flex-direction: column;
}

.trader-name {
  font-weight: 600;
  color: var(--text-primary);
}

.trader-joined {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.roi-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.roi-value.positive {
  color: var(--success);
}

.roi-value.negative {
  color: var(--danger);
}

.pnl-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.pnl-value.positive {
  color: var(--success);
}

.pnl-value.negative {
  color: var(--danger);
}

.winrate-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.winrate-progress {
  width: 60px;
  height: 4px;
  background: var(--border-glass);
  border-radius: 2px;
  overflow: hidden;
}

.winrate-fill {
  height: 100%;
  background: var(--success);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.platform-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.platform-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  color: var(--text-tertiary);
}

.verified-badge-table {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 4px 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: 4px;
}

.verified-badge-table svg {
  width: 12px;
  height: 12px;
}

/* Loading Dots */
.loader-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.loader-dots span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: loader-bounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loader-bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Pagination */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  gap: 4px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover {
  background: var(--bg-glass);
}

.page-btn.active {
  background: var(--text-primary);
  color: var(--bg-main);
  font-weight: 600;
}

/* ========================================
   Trader Card Grid Layout
   ======================================== */

.traders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.trader-card {
  position: relative;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.3s var(--ease-out);
  overflow: hidden;
}

.trader-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.trader-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.trader-card:hover::before {
  opacity: 1;
}

/* Rank Badge */
.card-rank {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.card-rank .rank-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.card-rank.gold .rank-number {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border: none;
  color: #1a1a1a;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.card-rank.silver .rank-number {
  background: linear-gradient(135deg, #E8E8E8, #B8B8B8);
  border: none;
  color: #1a1a1a;
  box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}

.card-rank.bronze .rank-number {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}

.card-rank .rank-icon {
  font-size: 1rem;
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-right: 50px; /* Space for rank badge */
}

.card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.trader-card[data-rank="1"] .card-avatar { background: linear-gradient(135deg, #FFD700, #FFA500); color: #1a1a1a; }
.trader-card[data-rank="2"] .card-avatar { background: linear-gradient(135deg, #E8E8E8, #9CA3AF); color: #1a1a1a; }
.trader-card[data-rank="3"] .card-avatar { background: linear-gradient(135deg, #CD7F32, #92400E); }
.trader-card[data-rank="4"] .card-avatar { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.trader-card[data-rank="5"] .card-avatar { background: linear-gradient(135deg, #06B6D4, #0891B2); }
.trader-card[data-rank="6"] .card-avatar { background: linear-gradient(135deg, #EC4899, #DB2777); }

.card-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-username {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.card-badge.verified {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.card-badge.verified::before {
  content: '✓';
  font-weight: bold;
}

/* Card Stats */
.card-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-main .stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.stat-main .stat-value.positive { color: var(--success); }
.stat-main .stat-value.negative { color: var(--danger); }

.stat-main .stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.stat-item .stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.stat-item .stat-value.positive { color: var(--success); }
.stat-item .stat-value.negative { color: var(--danger); }

.stat-item .stat-label {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Platform Pills */
.card-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.platform-pill {
  font-size: 0.7rem;
  padding: 4px 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.trader-card:hover .platform-pill {
  border-color: var(--border-glass-hover);
}

/* Mini Chart */
.card-chart {
  height: 40px;
  margin-top: auto;
}

.mini-chart {
  width: 100%;
  height: 100%;
}

.mini-chart .chart-line {
  fill: none;
  stroke: var(--success);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-chart .chart-area {
  fill: url(#chartGradient);
  opacity: 0.3;
}

/* Load More Section */
.load-more-section {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.load-more-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
}

.load-more-btn svg {
  transition: transform 0.3s ease;
}

.load-more-btn:hover svg {
  transform: translateY(2px);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin-top: 2rem;
}

.empty-state-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.empty-state .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hide empty state when grid has content */
.traders-grid:not(:empty) + .empty-state {
  display: none;
}

/* Leaderboard Responsive */
@media (max-width: 1024px) {
  .podium-grid {
    gap: 1rem;
  }

  .podium-card {
    padding: 1.5rem 1rem;
  }

  .leaderboard-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .controls-left, .controls-right {
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .leaderboard-hero {
    padding: calc(var(--nav-height) + 2rem) 1.25rem 2rem;
  }

  .leaderboard-hero h1 {
    font-size: 2rem;
  }

  .leaderboard-container {
    padding: 0 1.25rem 3rem;
  }

  .podium-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 400px;
  }

  .podium-card {
    order: 2;
  }

  .podium-1 {
    order: 1;
  }

  .podium-2 {
    order: 2;
  }

  .podium-3 {
    order: 3;
  }

  .controls-left, .controls-right {
    flex-direction: column;
    gap: 1rem;
  }

  .filter-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .filter-tab {
    flex: 1;
    text-align: center;
  }

  .search-input {
    width: 100%;
  }

  .search-input:focus {
    width: 100%;
  }

  .leaderboard-table-wrapper {
    margin: 0 -1.25rem;
    border-radius: 0;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.875rem 0.75rem;
  }

  .col-pnl, .col-platforms {
    display: none;
  }

  .pagination-bar {
    flex-direction: column;
    gap: 1rem;
  }

  /* Card Grid Mobile */
  .traders-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .trader-card {
    padding: 1.25rem;
  }

  .card-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-main .stat-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .leaderboard-hero h1 {
    font-size: 1.75rem;
  }

  .podium-roi {
    font-size: 1.25rem;
  }

  .col-winrate, .col-trades {
    display: none;
  }

  .trader-joined {
    display: none;
  }
}

/* Very Small Devices - max-width: 360px */
@media (max-width: 360px) {
  h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.625rem 1rem;
  }

  .btn-lg {
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
  }

  .exchange-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid-dashboard {
    grid-template-columns: 1fr;
  }
}

/* Landscape Phone Orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: calc(60px + 1.5rem);
    padding-bottom: 2rem;
  }

  .hero-visual {
    display: none;
  }

  .mobile-menu-overlay {
    padding-top: 60px;
  }

  .mobile-menu-content {
    padding: 1rem;
    gap: 0.75rem;
  }

  .mobile-link {
    padding: 0.5rem 0;
    min-height: 40px;
  }
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Ensure images don't overflow */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Hide elements meant for desktop only */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}

/* Show elements meant for mobile only */
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
}