:root {
  --bg-color: #030712; /* Deep rich black/slate */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #927052;
  --primary-hover: #7a5d44;
  --card-bg: rgba(30, 41, 59, 0.4);
  --card-border: rgba(148, 163, 184, 0.1);
  --glow: 0 0 20px rgba(146, 112, 82, 0.3);
}

body, html {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { text-decoration: none; transition: color 0.2s; }

/* Navbar */
.landing-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.025em;
}

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

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: white; }

.user-welcome {
  color: var(--text-muted); /* Use muted instead of text-secondary which might not be defined or consistent */
  font-weight: 500;
  font-size: 0.95rem;
}

/* Hero Section */
.hero {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Background Glow Effect */
.hero::before {
  content: '';
  position: absolute;
  top: -100px; /* Fixed value to reduce layout shift */
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(146, 112, 82, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero h1 .highlight {
  color: var(--primary);
  /* Subtle text shadow instead of gradient */
  text-shadow: 0 0 30px rgba(146, 112, 82, 0.4);
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Forum Styles */
.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

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

.post-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  border-color: var(--primary);
}

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.post-content {
  color: #cbd5e1; /* Slate 300 */
  line-height: 1.6;
}

/* Form Styles */
.form-container {
  max-width: 800px;
  margin: 4rem auto;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.5); /* Darker input bg */
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-family: inherit;
  color: var(--text-main);
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Auth Styles */
.auth-container {
  max-width: 400px;
  margin: 100px auto;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.alert {
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.alert.error { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert.success { background: rgba(34, 197, 94, 0.1); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.2); }

/* Buttons (reusing some from main.css or defining here if missing) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-main);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--text-muted);
}

.btn.primary {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  background: transparent;
  border-color: var(--card-border);
}

.btn.sm {
  padding: 4px 12px;
  font-size: 0.85rem;
}
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

/* Buttons */
.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(146, 112, 82, 0.3);
}
.btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid var(--card-border);
}
.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Features Grid */
.features {
  padding: 80px 0;
}

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

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 32px;
  border-radius: 12px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(146, 112, 82, 0.3);
}

.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: rgba(146, 112, 82, 0.1);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--text-muted);
  margin: 0;
}

/* Courses Section */
.course-list-section {
  padding: 100px 0;
  border-top: 1px solid var(--card-border);
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.course-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.3) 100%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.course-card h3 {
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.course-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-grow: 1;
}

/* Footer */
.landing-footer {
  padding: 40px 0;
  border-top: 1px solid var(--card-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.page-content {
  margin-top: 8rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  transition: all 0.3s ease;
}

/* Hamburger Animation */
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .cta-group { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  
  /* Navigation Mobile */
  .nav-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(3, 7, 18, 0.98);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    gap: 1.5rem; /* More space between links on mobile */
  }
  
  .nav-links.active {
    display: flex;
  }
  
  /* Auth Pages Mobile */
  .auth-container {
    margin: 40px auto !important; /* Override inline styles if any, though we should move them to CSS */
    padding: 1.5rem;
    width: 100%;
  }

  /* Forum/Blog Mobile */
  .forum-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch; /* Stretch buttons to full width */
  }
  
  /* General Container */
  .container {
    padding: 0 16px;
  }
  
  /* Adjust top spacing for content below fixed nav */
  .content-spacer, .page-content {
    margin-top: 140px !important; /* Adjust based on nav height */
  }
}
