: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: #161e2c; /* Slightly lightened for better contrast with bg-dark */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.12); /* Increased opacity for better visibility */
}

* {
  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: 600px;
  margin: 0 auto;
  line-height: 1.6;
  word-break: keep-all;
}

.header-link-p {
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s ease;
}

.header-link-p:hover {
  transform: translateY(-2px);
}

.header-link-p:hover p {
  color: #c084fc;
  background: linear-gradient(135deg, #ffffff 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hub-header {
    padding: 4rem 1.5rem 3rem;
  }
  
  .hub-header h1 {
    font-size: 2.75rem;
  }
  
  .hub-header p {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .hub-header h1 {
    font-size: 2.25rem;
  }
  
  .hub-header p {
    font-size: 0.9rem; /* Reduced to keep text on one line */
    padding: 0 0.5rem;
    white-space: nowrap; /* Force one line */
  }
  
  .hub-container {
    padding: 0 1.25rem 4rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
}

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

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

.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(340px, 1fr));
  gap: 2.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: all 0.3s ease;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); /* Added shadow for depth */
}

.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: all 0.4s ease;
  z-index: -1;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.card-inner {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1.25rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%), var(--bg-panel); /* Added subtle gradient mask */
}

/* 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);
}

/* -----------------------------------------
   NEW: Global Header & Footer Components
----------------------------------------- */
site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(9, 14, 23, 0.8); /* Restored original background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color); /* Restored original border */
  display: block;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-indigo), var(--brand-purple));
  transition: width 0.3s ease;
}

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

.nav-btn:hover::after {
  width: 100%;
}

.nav-btn.active {
  color: #c084fc;
}

.nav-btn.active::after {
  width: 100%;
}

.nav-btn svg {
  opacity: 0.7;
}

.nav-btn:hover svg {
  opacity: 1;
}

/* 기존 nav-links a 스타일 제거 또는 덮어쓰기 */
.nav-links a {
  /* nav-btn 클래스로 대체되므로 기본 스타일은 유지하거나 생략 */
}

.nav-cta {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc !important;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* Footer Styling */
site-footer {
  background: #060a10;
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
  display: block;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-info h4 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-info p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.footer-links h5 {
  color: var(--text-main);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--brand-purple);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Info Section Styling (For High-Quality Content) */
.info-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.info-header {
  margin-bottom: 2.5rem;
}

.info-header h2 {
  font-size: 2rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.info-header p {
  color: var(--text-muted);
  max-width: 800px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.info-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 1.5rem;
}

.info-card h4 {
  color: var(--text-main);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

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

.article-content {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

.article-content h3 {
  color: var(--text-main);
  margin: 2.5rem 0 1.25rem;
  font-size: 1.5rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
  }
}

