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

:root {
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #e2e8f0;
  --gray-200: #cbd5e1;
  --gray-300: #94a3b8;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --shadow-sm: rgba(0, 0, 0, 0.05);
  --shadow-md: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
  --shadow-xl: rgba(0, 0, 0, 0.25);
  
  /* Subject colors */
  --general-color: #fbbf24;
  --math-color: #FF6B6B;
  --physics-color: #4ECDC4;
  --chemistry-color: #45B7D1;
  --biology-color: #96CEB4;
  --computer-color: #6C5CE7;
  --english-color: #FF8B94;
  --history-color: #A8E6CF;
  --geography-color: #DDD6F3;
}

body {
  background: var(--white);
  color: var(--gray-700);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--purple-50) 100%);
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
  z-index: 0;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  z-index: 1;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  color: var(--blue-600);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px var(--shadow-sm);
  margin-bottom: 2rem;
  border: 1px solid var(--blue-100);
}

.hero-badge i {
  color: var(--blue-500);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(135deg, var(--blue-600), var(--purple-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--gray-600);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.hero-cta {
  margin-bottom: 2rem;
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
  border-radius: 16px;
  box-shadow: 0 8px 24px var(--shadow-md);
}

.btn-large:hover {
  box-shadow: 0 12px 32px var(--shadow-lg);
  transform: translateY(-3px);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-600);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.floating-cards {
  position: relative;
  width: 300px;
  height: 300px;
}

.floating-card {
  position: absolute;
  background: var(--white);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--gray-100);
  animation: float 6s ease-in-out infinite;
}

.floating-card i {
  font-size: 1.5rem;
  color: var(--blue-500);
}

.floating-card span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.card-1 {
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.card-2 {
  top: 50px;
  right: 0;
  animation-delay: 2s;
}

.card-3 {
  bottom: 0;
  left: 50px;
  animation-delay: 4s;
}

/* Features Section */
.features-section {
  padding: 6rem 0;
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--gray-100);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow-lg);
  border-color: var(--blue-200);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.feature-icon i {
  font-size: 2rem;
  color: var(--white);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.feature-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--blue-600);
  font-weight: 500;
  font-size: 0.875rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-action {
  opacity: 1;
  transform: translateY(0);
}

.feature-action i {
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-action i {
  transform: translateX(4px);
}

/* Exams Section */
.exams-section {
  padding: 6rem 0;
  background: var(--gray-50);
  scroll-margin-top: 100px;
}

.exam-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.exam-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exam-card {
  background: var(--white);
  border: 2px solid var(--gray-100);
  border-radius: 20px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px var(--shadow-sm);
  opacity: 0;
  transform: translateY(30px);
}

.exam-card:hover {
  transform: translateY(-8px);
  border-color: var(--blue-300);
  box-shadow: 0 20px 40px var(--shadow-lg);
}

.exam-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.exam-icon img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.exam-card:hover .exam-icon img {
  transform: scale(1.1);
}

.exam-content {
  text-align: center;
}

.exam-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.exam-description {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.exam-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--blue-600);
  font-weight: 500;
  font-size: 0.875rem;
}

.exam-action i {
  transition: transform 0.3s ease;
}

.exam-card:hover .exam-action i {
  transform: translateX(4px);
}

/* Subjects Container */
.subjects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.subjects-container.show-subjects {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  height: auto;
  margin-top: 1rem;
}

.subject-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow-sm);
}

.subject-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-300);
  box-shadow: 0 8px 24px var(--shadow-md);
}

.subject-icon {
  font-size: 1.25rem;
  background: var(--gray-50);
  padding: 0.75rem;
  border-radius: 10px;
  min-width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.subject-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-700);
  flex: 1;
}

.subject-arrow {
  font-size: 0.875rem;
  color: var(--gray-400);
  transition: all 0.3s ease;
}

.subject-card:hover .subject-arrow {
  color: var(--blue-500);
  transform: translateX(4px);
}

/* Subject-specific colors */
.subject-icon.math { color: var(--math-color); }
.subject-icon.physics { color: var(--physics-color); }
.subject-icon.chemistry { color: var(--chemistry-color); }
.subject-icon.biology { color: var(--biology-color); }
.subject-icon.general { color: var(--general-color); }
.subject-icon.computer { color: var(--computer-color); }
.subject-icon.english { color: var(--english-color); }
.subject-icon.history { color: var(--history-color); }
.subject-icon.geography { color: var(--geography-color); }

/* Hover effects for each subject */
.subject-card:hover .subject-icon.math { background: var(--math-color); color: white; }
.subject-card:hover .subject-icon.general { background: var(--general-color); color: white; }
.subject-card:hover .subject-icon.physics { background: var(--physics-color); color: white; }
.subject-card:hover .subject-icon.chemistry { background: var(--chemistry-color); color: white; }
.subject-card:hover .subject-icon.biology { background: var(--biology-color); color: white; }
.subject-card:hover .subject-icon.computer { background: var(--computer-color); color: white; }
.subject-card:hover .subject-icon.english { background: var(--english-color); color: white; }
.subject-card:hover .subject-icon.history { background: var(--history-color); color: white; }
.subject-card:hover .subject-icon.geography { background: var(--geography-color); color: white; }

/* Stats Section */
.stats-section {
  padding: 6rem 0;
  background: var(--gray-50);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.stat-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--gray-100);
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px var(--shadow-sm);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-md);
  border-color: var(--blue-200);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--blue-600);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.stat-description {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* Blog Preview Section */
.blog-preview-section {
  background: #f8fafc;
  padding: 4rem 0;
}

.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.blog-preview-card {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.blog-preview-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.blog-preview-card p {
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.blog-preview-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.blog-preview-link:hover {
  color: #2563eb;
}

.blog-preview-cta {
  text-align: center;
  margin-top: 2rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 4rem 0;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--white);
  color: var(--blue-600);
  border: 2px solid var(--white);
}

.btn-primary:hover {
  background: transparent;
  color: var(--white);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--blue-600);
  transform: translateY(-2px);
}

/* Error and No Subjects Messages */
.no-subjects,
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: var(--gray-600);
  background: var(--gray-50);
  border-radius: 12px;
  border: 1px solid var(--gray-200);
}

.error-message {
  color: #ef4444;
  background: #fee2e2;
  border-color: #fecaca;
}

/* Animations */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.animate-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Media Queries */
@media (max-width: 1024px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 3rem 1rem;
  }
  
  .hero-content {
    max-width: 100%;
    margin-bottom: 3rem;
  }
  
  .hero-stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card {
    padding: 2rem;
  }
  
  .exam-container {
    grid-template-columns: 1fr;
  }
  
  .subjects-container {
    grid-template-columns: 1fr;
  }
  
  .cta-content h2 {
    font-size: 2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 1rem;
    min-height: 60vh;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .floating-cards {
    width: 250px;
    height: 250px;
  }
  
  .floating-card {
    padding: 1rem;
  }
  
  .features-section,
  .exams-section,
  .cta-section {
    padding: 4rem 0;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .exam-card {
    padding: 1.5rem;
  }
  
  .subject-card {
    padding: 0.75rem;
  }
}

/* Purple gradient variant for some elements */
:root {
  --purple-50: #faf5ff;
}
