@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --sidebar-bg: rgba(15, 23, 42, 0.6);
  --sidebar-border: rgba(255, 255, 255, 0.05);
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-base: #8b5cf6;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(30, 41, 59, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --error: #ef4444;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-darker);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at 10% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%), radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
  z-index: -1;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 320px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  z-index: 10;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  color: transparent;
}

.sidebar-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.nav-category {
  margin-top: 32px;
  margin-bottom: 8px;
  padding: 0 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 16px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.nav-btn i {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: all 0.2s;
}

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

.nav-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
  color: var(--text-primary);
  border-left: 3px solid var(--accent-purple);
}

.nav-btn.active i {
  color: var(--accent-purple);
  opacity: 1;
}

.main-content {
  flex: 1;
  padding: 48px;
  max-width: 1200px;
}

.title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 48px;
}

.highlight {
  color: var(--accent-purple);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 32px;
  align-items: stretch;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  backdrop-filter: blur(12px);
  transition: transform 0.2s;
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.theory-content h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.theory-content ul {
  list-style-type: none;
  padding-left: 0;
}

.theory-content li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 24px;
  color: var(--text-muted);
}

.theory-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-purple);
  font-weight: bold;
}
/* ------- MOBIL RESZPONSZIVITÁS ------- */
@media (max-width: 850px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 24px 20px;
    border-right: none;
    border-bottom: 1px solid var(--sidebar-border);
  }

  .sidebar > div:first-child {
    margin-bottom: 24px !important;
    text-align: center;
  }

  .nav-category {
    text-align: center;
    margin-top: 24px;
    font-size: 0.8rem;
  }

  .nav-btn {
    justify-content: center;
    padding: 14px;
    font-size: 1.05rem;
  }

  .main-content {
    padding: 24px 16px;
  }

  .title {
    font-size: 1.8rem;
    text-align: center;
  }

  .subtitle {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 32px;
  }

  .glass-card {
    padding: 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Hogy a hosszú, komplex képletek kiférjenek mobilon a dobozból anélkül, hogy szétnyomnák: */
  .equation-display, .theory-content {
    overflow-x: auto;
    padding-bottom: 8px;
  }
}
