:root {
  /* Brand Colors matching Lotto App */
  --brand-purple: #a855f7;
  --brand-indigo: #6366f1;
  --brand-pink: #ec4899;
  --brand-blue: #3b82f6;
  
  /* Hub Specific Colors */
  --bg-dark: #090e17; /* Slightly darker than lotto for contrast */
  --bg-panel: #111827;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'Manrope', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* 1. Subtle Grid Background for Hub */
.hub-bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* 2. Top Aurora Glow (Connecting to Lotto Theme but placed differently) */
.hub-hero-glow {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 400px;
  z-index: -1;
  background: radial-gradient(ellipse at center, 
    rgba(99, 102, 241, 0.15) 0%, 
    rgba(168, 85, 247, 0.15) 30%, 
    rgba(236, 72, 153, 0.05) 60%, 
    transparent 80%);
  filter: blur(60px);
  pointer-events: none;
}

/* Header Styling */
.hub-header {
  text-align: center;
  padding: 6rem 2rem 4rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-badge {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.hub-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-header p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Main Container */
.hub-container {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  width: 100%;
  z-index: 1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
}

.title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color) 0%, transparent 100%);
}

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

/* Hub Card Styling - Solid Panels with Glow Borders on Hover */
.tool-card {
  position: relative;
  border-radius: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  background: var(--bg-panel);
  z-index: 1;
  transition: transform 0.3s ease;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  padding: 1px; /* border thickness */
  background: var(--border-color);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.4s ease;
  z-index: -1;
}

.tool-card:hover {
  transform: translateY(-4px);
}

.card-inner {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1.25rem;
  border-radius: 1.25rem;
  background: var(--bg-panel); /* Mask inner background */
}

/* Specific styling for the Lotto Card to show its theme subtly */
.lotto-card:hover::before {
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-pink), var(--brand-purple));
}

.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 1.25rem;
  pointer-events: none;
  z-index: 0;
}

.lotto-card:hover .card-glow {
  opacity: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lotto-card:hover .card-icon {
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-purple));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.active {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.status-badge.upcoming {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.card-content {
  flex: 1;
  z-index: 1;
}

.card-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.card-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.3s ease;
  z-index: 1;
  margin-top: 0.5rem;
}

.lotto-card:hover .card-footer {
  color: #c084fc;
}

.card-footer svg {
  transition: transform 0.3s ease;
}

.lotto-card:hover .card-footer svg {
  transform: translateX(4px);
}

/* Placeholder specific */
.tool-card.placeholder {
  cursor: default;
}

.tool-card.placeholder:hover {
  transform: none;
}

.tool-card.placeholder::before {
  background: repeating-linear-gradient(45deg, 
    var(--border-color), 
    var(--border-color) 10px, 
    transparent 10px, 
    transparent 20px
  );
}

.tool-card.placeholder .card-icon {
  color: var(--text-muted);
}
