:root {
  --bg-dark: #0b0f19;
  --bg-panel: rgba(20, 26, 43, 0.6);
  --bg-panel-hover: rgba(30, 38, 60, 0.8);
  --text-main: #f0f4f8;
  --text-muted: #8b9bb4;
  --accent-cyan: #00f0ff;
  --accent-purple: #b026ff;
  --accent-blue: #0077ff;
  --positive: #00e676;
  --negative: #ff3d00;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(12px);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(0, 119, 255, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(176, 38, 255, 0.15), transparent 25%);
  background-attachment: fixed;
}

/* Header & Nav */
header {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: var(--glass-blur);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  font-size: 2rem;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
}

nav a:hover, nav a.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

nav a.active {
  position: relative;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
}

/* Main Layout */
main {
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.stat-card .stat-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-card .stat-change {
  font-size: 0.9rem;
  font-weight: 500;
}

.positive {
  color: var(--positive);
}

.negative {
  color: var(--negative);
}

/* Tables */
.table-container {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.table-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

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

th, td {
  padding: 16px 20px;
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-color);
}

td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 1rem;
}

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

tr {
  transition: background 0.2s ease;
}

tr:hover {
  background: var(--bg-panel-hover);
}

.rank {
  font-weight: 700;
  color: var(--accent-cyan);
}

.address {
  font-family: 'Courier New', Courier, monospace;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Cards (Upcoming Bets) */
.bets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
}

.bet-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.bet-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0, 119, 255, 0.15);
}

.bet-market {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
}

.bet-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bet-meta .highlight {
  color: var(--accent-cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bet-meta .highlight svg {
  width: 16px;
  height: 16px;
}

.bet-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.side-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.side-badge.yes {
  background: rgba(0, 230, 118, 0.1);
  color: var(--positive);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.side-badge.no {
  background: rgba(255, 61, 0, 0.1);
  color: var(--negative);
  border: 1px solid rgba(255, 61, 0, 0.3);
}

.volume {
  font-weight: 600;
  font-size: 1.1rem;
}

.fee-cell {
  color: var(--accent-cyan);
  font-weight: 600;
  font-family: 'Courier New', Courier, monospace;
}

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

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
    padding: 15px 20px;
  }
  
  main {
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .bets-grid {
    grid-template-columns: 1fr;
  }
  
  .table-container {
    overflow-x: auto;
  }
}
