* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

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

.sidebar {
  width: 280px;
  background: #020617;
  border-right: 1px solid #1e293b;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand h1 {
  font-size: 18px;
  margin-bottom: 5px;
}

.brand-subtitle {
  font-size: 12px;
  color: #94a3b8;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  padding: 10px;
  background: transparent;
  border: 1px solid #1e293b;
  color: #cbd5f5;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
  transition: 0.2s ease;
}

.nav-btn:hover {
  background: #1e293b;
}

.nav-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-section label {
  font-size: 12px;
  color: #94a3b8;
}

.sidebar-section select {
  padding: 10px;
  border-radius: 8px;
  background: #020617;
  border: 1px solid #1e293b;
  color: white;
}

.progress-panel {
  margin-top: auto;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #22c55e;
  transition: width 0.3s ease;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 20px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.topbar p {
  font-size: 13px;
  color: #94a3b8;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.choice-btn {
  transition: 0.2s ease;
}

.primary-btn {
  background: #2563eb;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

.primary-btn:hover {
  background: #1d4ed8;
}

.secondary-btn {
  background: #334155;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

.secondary-btn:hover {
  background: #475569;
}

.ghost-btn {
  background: transparent;
  border: 1px solid #334155;
  padding: 8px 12px;
  border-radius: 8px;
  color: #cbd5f5;
  cursor: pointer;
}

.ghost-btn:hover {
  background: #1e293b;
}

.small-btn {
  padding: 6px 10px;
  font-size: 12px;
}

.view {
  display: none;
  padding: 20px;
}

.active-view {
  display: block;
}

.content-card,
.hero-card,
.info-card,
.lesson-card,
.question-card,
.feedback-panel,
.scenario-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 12px;
}

.content-card {
  padding: 20px;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h3 {
  margin-bottom: 5px;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.hero-text h3 {
  margin-bottom: 10px;
}

.hero-text p {
  color: #cbd5e1;
  max-width: 760px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.info-card,
.lesson-card,
.question-card,
.feedback-panel,
.scenario-card {
  padding: 15px;
}

.info-card h4,
.lesson-card h4,
.question-card h4,
.scenario-card h4 {
  margin-bottom: 8px;
}

.info-card p,
.lesson-card p,
.question-card p,
.feedback-panel p,
.scenario-card p,
.detail-box,
.flashcard-face p {
  line-height: 1.5;
  color: #cbd5e1;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flashcard {
  perspective: 1000px;
  margin: 20px 0;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 220px;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #1e293b;
}

.flashcard-front {
  background: #020617;
}

.flashcard-back {
  background: #1e293b;
  transform: rotateY(180deg);
}

.flashcard-toolbar,
.quiz-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.flashcard-actions,
.quiz-actions,
.scenario-actions,
.quiz-toolbar {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.choice-btn {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: transparent;
  color: white;
  cursor: pointer;
  text-align: left;
}

.choice-btn:hover {
  background: #1e293b;
}

.choice-btn.selected {
  background: #2563eb;
  border-color: #2563eb;
}

.detail-box {
  margin-top: 10px;
  padding: 12px;
  background: #1e293b;
  border-radius: 8px;
  border: 1px solid #334155;
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  #app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
