/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0a0e1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-card-active: rgba(74, 222, 128, 0.06);
  --text-primary: #e8ecf4;
  --text-secondary: #8b95a8;
  --text-muted: #5a6478;
  --accent: #4ade80;
  --accent-glow: rgba(74, 222, 128, 0.3);
  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(74, 222, 128, 0.3);
  --border-soon: rgba(255, 255, 255, 0.04);
  --font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.3);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Background Effects ===== */
.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.15), transparent 70%);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent 70%);
  bottom: -50px;
  left: -50px;
  animation-delay: -7s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.1), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.02); }
}

/* ===== Container ===== */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  padding: 40px 24px;
}

/* ===== Header ===== */
.header {
  text-align: center;
  margin-bottom: 48px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.logo-icon {
  font-size: 36px;
  animation: sway 3s ease-in-out infinite;
}

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

.logo h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
  margin-top: 4px;
}

/* ===== Subjects Grid ===== */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

/* ===== Subject Card ===== */
.subject-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: card-enter 0.6s ease-out both;
  overflow: hidden;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Active card */
.subject-card.active {
  background: var(--bg-card-active);
  border: 1px solid var(--border-active);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.subject-card.active:hover {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: var(--shadow-card-hover), 0 0 40px var(--accent-glow);
  transform: translateY(-4px);
}

.subject-card.active:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Glow effect for active card */
.card-glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.subject-card.active:hover .card-glow {
  opacity: 1;
}

/* Coming soon card */
.subject-card.coming-soon {
  background: var(--bg-card);
  border: 1px solid var(--border-soon);
  opacity: 0.55;
  cursor: default;
}

.subject-card.coming-soon:hover {
  opacity: 0.7;
  background: var(--bg-card-hover);
}

/* Card Content */
.card-content {
  flex: 1;
  min-width: 0;
}

.card-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  line-height: 1;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-active {
  background: rgba(74, 222, 128, 0.15);
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.badge-soon {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-arrow {
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .container {
    padding: 24px 16px;
  }

  .header {
    margin-bottom: 32px;
  }

  .logo h1 {
    font-size: 1.6rem;
  }

  .subjects-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .subject-card {
    padding: 22px 20px;
  }

  .card-icon {
    font-size: 2rem;
    margin-bottom: 8px;
  }

  .card-title {
    font-size: 1.15rem;
  }
}
