:root {
  --primary: #00F2A9;
  --secondary: #7B61FF;
  --accent: #00D4FF;
  --bg: #0B0E14;
  --surface: #141921;
  --surface2: #1C2230;
  --border: #2A3142;
  --text: #FFFFFF;
  --text2: #8A919E;
  --success: #00F2A9;
  --error: #FF4D6A;
  --warning: #FFB800;
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  --glass: rgba(28, 34, 48, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg);
  overflow: hidden;
}

.animated-bg::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle at 20% 50%, rgba(123, 97, 255, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(0, 242, 169, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 40% 10%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
  animation: bgAnimation 20s ease infinite;
}

@keyframes bgAnimation {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-5%, 5%) rotate(180deg); }
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  gap: 8px;
  flex: 1;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > button {
  background: none;
  border: none;
  color: var(--text);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-dropdown > button:hover {
  background: var(--surface2);
  color: var(--primary);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dropdown-menu a:hover {
  background: var(--surface2);
  color: var(--primary);
  transform: translateX(4px);
}

.search-bar {
  flex: 1;
  max-width: 400px;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 242, 169, 0.1);
}

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.icon-btn:hover {
  background: var(--surface2);
  color: var(--primary);
}

.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--error);
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 10px;
  font-weight: 600;
}

/* Glass Cards */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(0, 242, 169, 0.1);
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 242, 169, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(0, 242, 169, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: 0 4px 16px rgba(123, 97, 255, 0.3);
}

.btn-secondary:hover {
  box-shadow: 0 6px 24px rgba(123, 97, 255, 0.4);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: var(--bg);
}

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

.btn-ghost:hover {
  background: var(--border);
}

/* Gradient Border */
.gradient-border {
  position: relative;
  border-radius: 16px;
  padding: 2px;
  background: var(--gradient-primary);
}

.gradient-border-content {
  background: var(--surface);
  border-radius: 14px;
  padding: 24px;
}

/* Glow Effect */
.glow {
  box-shadow: 0 0 20px rgba(0, 242, 169, 0.3);
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 242, 169, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 242, 169, 0.6); }
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 242, 169, 0.1);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.table tr:hover {
  background: var(--surface2);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease;
}

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

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.warning { border-left: 4px solid var(--warning); }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

/* Hero Section */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero h1 {
  font-size: 64px;
  font-weight: 700;
  margin-bottom: 24px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.hero p {
  font-size: 20px;
  color: var(--text2);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Stats */
.stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 48px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text2);
  font-size: 14px;
  margin-top: 8px;
}

/* Price Ticker */
.price-ticker {
  background: var(--surface2);
  padding: 12px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.ticker-content {
  display: flex;
  gap: 32px;
  animation: scroll 30s linear infinite;
  white-space: nowrap;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.ticker-item .symbol {
  font-weight: 600;
}

.ticker-item .price {
  color: var(--text2);
}

.ticker-item.up .change { color: var(--success); }
.ticker-item.down .change { color: var(--error); }

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px;
  }

  .nav-menu {
    display: none;
  }

  .search-bar {
    width: 100%;
    max-width: none;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 36px;
  }

  .toast-container {
    right: 12px;
    left: 12px;
  }

  .toast {
    min-width: auto;
  }
}

/* Progress Ring */
.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.35s;
  stroke: var(--primary);
  stroke-linecap: round;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: rgba(0, 242, 169, 0.2); color: var(--success); }
.badge-error { background: rgba(255, 77, 106, 0.2); color: var(--error); }
.badge-warning { background: rgba(255, 184, 0, 0.2); color: var(--warning); }
.badge-primary { background: rgba(0, 242, 169, 0.2); color: var(--primary); }

/* Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text2); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
