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

:root {
  --bg-gradient-start: #e0eafc;
  --bg-gradient-end: #cfdef3;
  --card-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(255, 255, 255, 0.6);
  --text-primary: #1a2a3a;
  --text-secondary: #2c3e50;
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-clay: 8px 8px 16px rgba(0, 0, 0, 0.1), -8px -8px 16px rgba(255, 255, 255, 0.7);
  --shadow-clay-hover: 12px 12px 20px rgba(0, 0, 0, 0.15), -12px -12px 20px rgba(255, 255, 255, 0.8);
  --accent: #6c5ce7;
  --accent-glow: #a29bfe;
  --btn-gradient: linear-gradient(135deg, #6c5ce7, #a363d9);
  --footer-bg: rgba(30, 30, 45, 0.85);
}

body.dark {
  --bg-gradient-start: #1a1e2f;
  --bg-gradient-end: #16213e;
  --card-bg: rgba(25, 30, 45, 0.6);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text-primary: #f0f3f8;
  --text-secondary: #cbd5e6;
  --shadow-clay: 8px 8px 16px rgba(0, 0, 0, 0.4), -8px -8px 16px rgba(60, 70, 100, 0.2);
  --footer-bg: rgba(0, 0, 0, 0.7);
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(145deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.2s ease;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

.navbar {
  backdrop-filter: blur(12px);
  background: var(--card-bg);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo,
.brand {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6c5ce7, #f39c12);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text-primary);
  transition: 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
}

.theme-toggle,
.hamburger,
.mobile-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-primary);
}

.hamburger,
.mobile-toggle {
  display: none;
  font-size: 1.8rem;
}

@media (max-width: 768px) {
  .hamburger,
  .mobile-toggle {
    display: block;
  }
  .main-nav {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    width: 70%;
    height: 100vh;
    padding: 2rem;
    transition: 0.3s;
    gap: 1.8rem;
    box-shadow: 5px 0 20px rgba(0,0,0,0.2);
    z-index: 999;
  }
  .main-nav.active {
    left: 0;
  }
  .mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    right: 1rem;
    width: min(280px, calc(100vw - 40px));
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
    z-index: 999;
  }
  .mobile-menu.show {
    display: block;
  }
  .mobile-menu a {
    display: block;
    margin-bottom: 14px;
    color: var(--text-primary);
  }
  .nav-container {
    flex-wrap: nowrap;
  }
}

main {
  max-width: 1300px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.hero {
  text-align: center;
  margin: 2rem 0 3rem;
}

.hero h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, #2d3436, #6c5ce7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.2rem;
  margin-top: 1rem;
}

.card-grid,
.cards-grid,
.course-grid,
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.clay-card,
.glass-card,
.course-card,
.platform-card,
.loader-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: 32px;
  box-shadow: var(--shadow-clay);
  border: 1px solid var(--glass-border);
  padding: 1.5rem;
  transition: all 0.25s ease;
  text-align: center;
}

.clay-card:hover,
.glass-card:hover,
.course-card:hover,
.platform-card:hover,
.loader-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-clay-hover);
}

.clay-card i,
.glass-card i,
.course-card i,
.platform-card i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.clay-card h3,
.glass-card h3,
.course-card h3,
.platform-card h3,
.loader-card h1 {
  margin: 0.5rem 0;
}

.btn-clay,
.glass-card button,
.course-card button,
.platform-card button,
.cta-button {
  background: var(--btn-gradient);
  border: none;
  padding: 10px 18px;
  border-radius: 40px;
  color: white;
  font-weight: 600;
  margin-top: 1rem;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-clay:hover,
.glass-card button:hover,
.course-card button:hover,
.platform-card button:hover,
.cta-button:hover {
  opacity: 0.9;
  transform: scale(0.98);
}

.ad-placeholder,
.ad-slot {
  background: rgba(0,0,0,0.05);
  border-radius: 24px;
  margin: 2rem 0;
  text-align: center;
  min-height: 120px;
}

.content-section,
.section-panel {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border-radius: 36px;
  padding: 2rem;
  margin: 2rem 0;
  line-height: 1.7;
}

.floating-report,
.back-to-top {
  position: fixed;
  z-index: 1100;
  border: none;
  padding: 12px 18px;
  border-radius: 50px;
  background: var(--accent);
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  cursor: pointer;
  text-decoration: none;
}

.floating-report {
  bottom: 96px;
  right: 20px;
}

.back-to-top {
  bottom: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  opacity: 0;
  pointer-events: none;
}

.site-footer {
  background: var(--footer-bg);
  backdrop-filter: blur(10px);
  padding: 2rem;
  text-align: center;
  margin-top: 3rem;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  color: #eee;
}

.footer-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.loader-shell {
  min-height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0;
}

.loader-card {
  width: min(700px, 100%);
  padding: 38px;
  border-radius: 42px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(28px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.16);
}

.progress-track {
  margin-top: 24px;
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s linear;
}

.loader-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.loader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.hidden {
  display: none;
}

@media (max-width: 1024px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
  }

  nav.main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-menu {
    display: none;
    position: static;
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    box-shadow: none;
    padding: 16px 0;
  }

  .mobile-menu.show {
    display: block;
  }

  .hero-copy,
  .stats-panel,
  .ad-panel,
  .section-panel,
  .loader-card {
    padding: 24px;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: calc(100% - 20px);
    padding: 18px 0 40px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }

  .top-actions {
    gap: 10px;
  }

  .stats-list,
  .hero-buttons {
    gap: 10px;
  }

  .ad-panel,
  .stats-panel,
  .section-panel,
  .glass-card,
  .course-card,
  .platform-card,
  .loader-card {
    border-radius: 26px;
    padding: 22px;
  }

  .floating-report,
  .back-to-top {
    padding: 12px 14px;
  }
}

@media (max-width: 520px) {
  .hero-copy .hero-buttons,
  .top-actions {
    justify-content: stretch;
    width: 100%;
  }

  .hero-copy .hero-buttons a,
  .theme-toggle,
  .mobile-toggle {
    width: 100%;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}
