:root {
  --primary: #2b6cb0;
  --bg: #f7fafc;
  --card-bg: #ffffff;
  --text: #2d3748;
  --accent: #319795;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  color: #1a365d;
  margin-bottom: 10px;
}

p.subtitle {
  text-align: center;
  color: #718096;
  margin-bottom: 25px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #4a5568;
  transition: 0.3s;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e0;
  font-size: 14px;
}

.card-box {
  perspective: 1000px;
  height: 380px;
  margin-bottom: 20px;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 25px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card-bg);
  border: 2px solid #e2e8f0;
}

.card-back {
  transform: rotateY(180deg);
  overflow-y: auto;
  background: #faf5ff;
  border-color: #d6bcfa;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.tag-est { background: #feebc8; color: #7b341e; }
.tag-dep { background: #ebf8ff; color: #2c5282; }
.tag-alu { background: #e6fffa; color: #234e52; }

.card-title {
  font-size: 24px;
  font-weight: bold;
  color: #1a202c;
  margin: 10px 0;
}

.hint-text {
  color: #a0aec0;
  font-style: italic;
  font-size: 13px;
  text-align: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13px;
  text-align: left;
}

.detail-item {
  background: white;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.detail-item strong {
  color: #4a5568;
  display: block;
  margin-bottom: 2px;
}

.nav-card-btns {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn {
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.btn:hover {
  opacity: 0.9;
}

.quiz-box {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quiz-option {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  text-align: left;
  background: #f7fafc;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 14px;
}

.quiz-option:hover {
  background: #edf2f7;
}

.quiz-option.correct {
  background: #c6f6d5;
  border-color: #38a169;
  color: #22543d;
  font-weight: bold;
}

.quiz-option.wrong {
  background: #fed7d7;
  border-color: #e53e3e;
  color: #742a2a;
}

.feedback {
  margin-top: 15px;
  font-weight: bold;
}
