:root {
  /* Premium Dark Theme Colors */
  --bg-body: #050505;
  --bg-carbon: #0f0f11;
  --bg-card: #141416;
  --bg-card-hover: #1c1c1f;
  --bg-surface: #1d1d20;
  --bg-glass: rgba(20, 20, 22, 0.85);
  
  --accent: #ff5722; /* Vibrant Orange */
  --accent-light: #ff7e55;
  --accent-glow: rgba(255, 87, 34, 0.4);
  --accent-dim: rgba(255, 87, 34, 0.1);
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  
  --border: #27272a;
  --border-light: #3f3f46;
  
  /* Spacing */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-float: 0 20px 40px -5px rgba(0, 0, 0, 0.6);
  --shadow-neon: 0 0 15px var(--accent-glow);
}

/* Base & Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-body);
  /* Carbon Texture Background */
  background-image: 
    radial-gradient(circle at 100% 0%, #1e1e24 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, #1a1a1d 0%, transparent 40%),
    linear-gradient(45deg, #0a0a0c 25%, transparent 25%, transparent 75%, #0a0a0c 75%, #0a0a0c),
    linear-gradient(45deg, #0a0a0c 25%, transparent 25%, transparent 75%, #0a0a0c 75%, #0a0a0c);
  background-position: 0 0, 0 0, 0 0, 2px 2px;
  background-size: 100% 100%, 100% 100%, 4px 4px, 4px 4px;
  
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 100px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-xs { font-size: 12px; line-height: 1.4; }
.text-sm { font-size: 14px; line-height: 1.5; }
.text-md { font-size: 16px; line-height: 1.5; }
.text-lg { font-size: 20px; line-height: 1.3; }
.text-xl { font-size: 24px; line-height: 1.2; }
.text-2xl { font-size: 32px; line-height: 1.1; }

.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }

.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

/* Layout Utilities */
.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-xs { gap: var(--space-2xs); }
.gap-sm { gap: var(--space-xs); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.w-full { width: 100%; }

/* Buttons & Interactives */
.btn {
  border: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active {
  transform: scale(0.96);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #e64a19 100%);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.filter-row {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: 4px var(--space-md);
  margin: 0 calc(var(--space-md) * -1);
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--text-primary);
  color: #000;
  border-color: var(--text-primary);
  font-weight: 700;
}

/* Cards */
.card-event {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  padding: 12px;
  gap: 12px;
  height: 140px;
  transition: transform 0.2s;
}

.card-event:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 4px;
  min-width: 0; /* Prevent text overflow issues */
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-title-row h3 {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presenter-tag {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}
.presenter-name {
  color: var(--accent);
  font-weight: 500;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-top: 4px;
}

.info-row .label {
  color: var(--text-muted);
}

.info-row .value {
  color: var(--text-secondary);
  font-weight: 500;
}

.card-media {
  width: 120px;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #202022;
}

/* Abstract placeholder art for cars */
.placeholder-art {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.placeholder-1 {
  background: linear-gradient(135deg, #2a2a30 0%, #18181b 100%);
}
.placeholder-1::after {
  content: "🏎️";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  filter: grayscale(1) opacity(0.3);
}

.placeholder-2 {
  background: linear-gradient(135deg, #1f1f25 0%, #101012 100%);
}

.media-badge-top-left {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 2px;
}

.media-badge-top-right {
  position: absolute;
  top: 6px;
  right: 6px;
  background: white;
  color: black;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
}

.media-badge-bottom {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 9px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80; /* Green */
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}

.card-expand-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    padding: 4px;
}

.date-separator {
  margin: var(--space-lg) 0 var(--space-sm);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* Floating Action Button (if needed) */
.fab {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(255, 87, 34, 0.5);
  border: none;
  z-index: 45;
  transition: transform 0.2s;
}
.fab:active { transform: scale(0.9); }

/* Navigation */
.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 18, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 12px 20px 28px; /* Safe area padding */
  display: flex;
  justify-content: space-around;
  z-index: 50;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link svg {
  stroke: currentColor;
  transition: all 0.2s;
}

.nav-link.active {
  color: var(--accent);
}
.nav-link.active svg {
  stroke: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Animation utilities */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: slideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
