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

body {
  background-color: #eef9f6;
  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 Hijau Toska Modern */
.header {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: white;
  text-align: center;
  padding: 20px 15px;
}

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

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

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

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

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

.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: #f7fdfb;
  border: 1px solid #81ecec;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

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

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

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

.frac {
  display: inline-block;
  vertical-align: middle;
  text-align: center;
  font-weight: bold;
}

.frac sup, .frac sub {
  font-size: 0.75em;
  display: block;
}

.frac sup { border-bottom: 1px solid #333; }

.visual-example {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.fraction-item {
  text-align: center;
}

.fraction-bar-preview {
  height: 24px;
  width: 100%;
  background-color: #dfe6e9;
  border: 2px solid #2d3436;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
  position: relative;
}

.bar-fill {
  height: 100%;
  background-color: #00b894;
}

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

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

.input-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.input-inline input {
  width: 50px;
  padding: 5px;
  border: 1px solid #b2bec3;
  border-radius: 4px;
  text-align: center;
}

.fraction-display {
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  color: #2d3436;
  margin: 4px 0;
}

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

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

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

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

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

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

.quiz-visual-box {
  margin: 10px 0;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

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

.option-btn {
  padding: 12px;
  border: 1px solid #00b894;
  background-color: #fff;
  color: #00b894;
  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: #00b894;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
}

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