@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  --background: hsl(195 50% 8%);
  --foreground: hsl(0 0% 98%);
  --card: hsl(195 40% 12%);
  --card-foreground: hsl(0 0% 98%);
  --primary: hsl(160 84% 48%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(185 90% 50%);
  --accent: hsl(175 95% 55%);
  --muted: hsl(185 20% 25%);
  --muted-foreground: hsl(185 10% 70%);
  --destructive: hsl(0 84% 60%);
  --border: hsl(185 20% 25%);
  --input: hsl(185 20% 25%);
  --ring: hsl(160 84% 48%);
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 0.75rem;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: linear-gradient(135deg, hsl(195 50% 8%) 0%, hsl(185 45% 12%) 50%, hsl(175 40% 15%) 100%);
  color: var(--foreground);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

button, input, select, textarea {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.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-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }

.m-4 { margin: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; }
.border-0 { border-width: 0; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.cursor-pointer { cursor: pointer; }

.opacity-0 { opacity: 0; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }

.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Text Sizes */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Custom Component Classes */
.gradient-text {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
}

.gradient-bg {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.glass-card {
  background-color: hsla(195, 40%, 12%, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsla(185, 20%, 25%, 0.5);
}

.glow {
  box-shadow: 0 10px 15px -3px hsla(160, 84%, 48%, 0.3), 0 4px 6px -4px hsla(160, 84%, 48%, 0.3);
}

.hero-gradient {
  background: radial-gradient(circle at 20% 50%, hsla(160, 84%, 48%, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, hsla(185, 90%, 50%, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 40% 80%, hsla(175, 95%, 55%, 0.2) 0%, transparent 50%);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: 0 10px 15px -3px hsla(160, 84%, 48%, 0.3);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.btn-secondary {
  background-color: hsla(195, 40%, 12%, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid hsla(185, 20%, 25%, 0.5);
  color: var(--foreground);
}

.btn-secondary:hover {
  background-color: hsla(195, 40%, 16%, 0.6);
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

/* Input Styles */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: hsla(195, 40%, 12%, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid hsla(185, 20%, 25%, 0.5);
  border-radius: var(--radius);
  color: var(--foreground);
  transition: all 0.3s ease;
}

.input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(160, 84%, 48%, 0.1);
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input-icon {
  position: relative;
}

.input-icon input {
  padding-left: 2.5rem;
}

.input-icon svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-foreground);
  pointer-events: none;
  z-index: 10;
}

/* Select Styles */
.select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: hsla(195, 40%, 12%, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid hsla(185, 20%, 25%, 0.5);
  border-radius: var(--radius);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.3s ease;
}

.select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(160, 84%, 48%, 0.1);
}

/* Label Styles */
.label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 32rem;
  background-color: hsla(195, 40%, 12%, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid hsla(185, 20%, 25%, 0.5);
  border-radius: 1rem;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
  color: var(--foreground);
  transition: background-color 0.3s ease;
}

.modal-close:hover {
  background-color: hsla(255, 255%, 255%, 0.1);
}

/* Card Styles */
.card {
  background-color: hsla(195, 40%, 12%, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid hsla(185, 20%, 25%, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 20px 25px -5px hsla(160, 84%, 48%, 0.2);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 40;
  background-color: hsla(195, 40%, 12%, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsla(185, 20%, 25%, 0.5);
}

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

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--foreground);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

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

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 4s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

.animate-slide-up {
  animation: slideInUp 0.5s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background-color: hsla(160, 84%, 48%, 0.5);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsla(160, 84%, 48%, 0.7);
}

/* Responsive Design */

/* Mobile First: Base styles for mobile */
@media (max-width: 639px) {
  /* Container adjustments */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Text sizes optimized for mobile */
  .text-4xl { font-size: 1.75rem !important; line-height: 1.2; }
  .text-5xl { font-size: 2rem !important; line-height: 1.2; }
  .text-6xl { font-size: 2.25rem !important; line-height: 1.1; }
  .text-7xl { font-size: 2.5rem !important; line-height: 1.1; }
  
  /* Modal optimization for mobile */
  .modal-content {
    margin: 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
  }

  /* Button sizes for better tap targets */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }

  .btn-lg {
    min-height: 48px;
    padding: 1rem 1.5rem;
  }

  /* Glass card padding */
  .glass-card {
    padding: 1.25rem !important;
  }

  /* Header adjustments */
  .header {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  /* Footer improvements */
  .footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Section padding */
  .py-24 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .py-12 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Course cards on mobile */
  .course-card {
    padding: 0.875rem !important;
  }

  /* Input fields */
  input, select, textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
}

/* Small devices (landscape phones, 640px and up) */
@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:p-8 { padding: 2rem; }
  .md\:p-12 { padding: 3rem; }
  .md\:p-16 { padding: 4rem; }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:text-7xl { font-size: 4.5rem; line-height: 1; }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  button, a, input, select, textarea {
    min-height: 44px;
  }

  /* Remove hover effects on touch devices */
  .btn:hover {
    transform: none;
  }
}

/* Success Icon Circle */
.success-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px hsla(160, 84%, 48%, 0.3);
}

.success-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  color: white;
}

/* Error Message */
.error-message {
  color: var(--destructive);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Success Message */
.success-message {
  color: var(--accent);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
