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

body {
  background-color: #f3f0f7;
  color: #2d3436;
  display: flex;
  justify-content: center;
}

.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: #ffffff;
  box-shadow: 0 0 15px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

/* Header Warna Indigo / Coral */
.header {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: white;
  text-align: center;
  padding: 20px 15px;
}

.header h1 {
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.header p {
  font-size: 0.88rem;
  opacity: 0.95;
}

.nav-menu {
  display: flex;
  background-color: #f1f0f6;
  border-bottom: 2px solid #dcdde1;
}

.nav-btn {
  flex: 1;
  padding: 10px 2px;
  border: none;
  background: none;
  font-size: 0.82rem;
  font-weight: bold;
  color: #636e72;
  cursor: pointer;
  transition: 0.3s;
}

.nav-btn.active {
  background-color: #ffffff;
  color: #6c5ce7;
  border-bottom: 3px solid #6c5ce7;
}

.content {
  padding: 15px;
  flex: 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #e1e8f0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.sub-card {
  background-color: #f8f7fc;
  border: 1px solid #a29bfe;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.sub-card h3 {
  font-size: 0.95rem;
  color: #6c5ce7;
  margin-bottom: 8px;
}

.card h2 {
  font-size: 1.1rem;
  color: #6c5ce7;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.92rem;
  line-height: 1.4;
}

.symbol-badge {
  display: inline-block;
  padding: 2px 8px;
  background-color: #6c5ce7;
  color: white;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1rem;
}

.formula-box, .example-box, .result-box {
  background-color: #f3f0f7;
  border-left: 4px solid #6c5ce7;
  padding: 12px;
  border-radius: 6px;
  margin: 10px 0;
}

.result-box {
  text-align: center;
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  margin: 12px 0;
}

.frac-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 70px;
}

.frac-input input {
  width: 100%;
  padding: 6px;
  border: 1px solid #b2bec3;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
}

.frac-line {
  width: 100%;
  height: 2px;
  background-color: #2d3436;
}

.compare-sym-display {
  font-size: 2rem;
  font-weight: bold;
  color: #e17055;
  min-width: 40px;
  text-align: center;
}

/* Visualizer Bar */
.bar-container {
  display: flex;
  height: 26px;
  width: 100%;
  border: 2px solid #2d3436;
  border-radius: 6px;
  overflow: hidden;
  background-color: #fff;
  margin-top: 6px;
}

.bar-segment {
  flex: 1;
  border-right: 1px solid #2d3436;
  background-color: #f1f2f6;
}

.bar-segment:last-child {
  border-right: none;
}

.bar-segment.active {
  background-color: #6c5ce7;
}

.bar-segment.active-alt {
  background-color: #00b894;
}

/* List Pengurutan */
.sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f7fc;
  border: 1px solid #a29bfe;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.sort-item .val {
  font-weight: bold;
  color: #6c5ce7;
  font-size: 1.1rem;
}

/* Kuis Style */
.quiz-header {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 8px;
}

.question {
  font-weight: bold;
  font-size: 0.98rem;
  margin-bottom: 12px;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  padding: 12px;
  border: 1px solid #6c5ce7;
  background-color: #fff;
  color: #6c5ce7;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}

.option-btn.correct {
  background-color: #00b894;
  color: white;
  border-color: #00b894;
}

.option-btn.wrong {
  background-color: #ff7675;
  color: white;
  border-color: #ff7675;
}

.feedback {
  margin-top: 10px;
  font-weight: bold;
  text-align: center;
}

.action-btn {
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  background-color: #6c5ce7;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.98rem;
  cursor: pointer;
}

.score-box {
  text-align: center;
  font-size: 3rem;
  font-weight: bold;
  color: #00b894;
  margin: 15px 0;
  }
