/* Donut Chart */
.donut-chart {
  position: relative;
  width: 130px; height: 130px;
}

.donut-chart svg { transform: rotate(-90deg); }

.donut-bg { fill: none; stroke: var(--bg); stroke-width: 6; }
.donut-fill {
  fill: none; stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-value { font-size: 1.45rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--text); }
.donut-label { font-size: 0.65rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem; }

/* Level Bar Chart */
.level-bar-chart { display: flex; flex-direction: column; gap: 0.6rem; }

.level-bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.level-bar-label { min-width: 25px; font-weight: 500; font-size: 0.72rem; color: var(--text-mid); }
.level-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

.level-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.level-bar-fill.a1 { background: var(--text); opacity: 1; }
.level-bar-fill.a2 { background: var(--text); opacity: 0.75; }
.level-bar-fill.b1 { background: var(--text); opacity: 0.5; }
.level-bar-fill.b2 { background: var(--text); opacity: 0.25; }

.level-bar-info {
  min-width: 60px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

/* Streak Flex Series */
.streak-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.streak-count {
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 0.25rem;
}

.streak-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.08em;
}

.streak-subtitle.right {
  margin-bottom: 0.25rem;
}

.streak-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
}

.streak-dot {
  flex: 1;
  aspect-ratio: 1;
  max-width: 14px;
  max-height: 14px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}

.streak-dot.active {
  background: var(--text);
}

.streak-dot.today {
  outline: 2px solid var(--text-light);
  outline-offset: 2px;
}
.streak-dot.active.today {
  outline-color: var(--text);
}

/* Score trend */
.score-trend {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
  padding: 0.5rem 0;
}

.score-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-bar.good { background: var(--text); opacity: 0.9; }
.score-bar.ok { background: var(--text); opacity: 0.5; }
.score-bar.bad { background: var(--border-dark); }

/* Yazma Pratigi */
.spell-area {
  text-align: center;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.spell-prompt {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.spell-meaning {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.spell-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.spell-hint-wrap {
  margin: -0.35rem 0 1rem;
}

.spell-letter-hint {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--text);
}

.spell-hint-char {
  display: inline-block;
  min-width: 0.65em;
}

.spell-hint-blank {
  color: var(--text-light);
  opacity: 0.75;
}

.spell-input {
  width: 100%;
  max-width: 280px;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.15rem;
  text-align: center;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s;
}

.spell-input:focus { border-color: var(--text); }
.spell-input.correct { border-color: var(--green); background: var(--green-bg); }
.spell-input.wrong { border-color: var(--red); background: var(--red-bg); }

.spell-feedback {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.25rem;
}

.spell-score {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.spell-score strong {
  color: var(--text);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.spell-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .donut-chart {
    width: 100px;
    height: 100px;
  }

  .donut-value {
    font-size: 1.15rem;
  }

  .donut-label {
    font-size: 0.55rem;
  }

  .streak-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .streak-count {
    font-size: 1.3rem;
  }

  .streak-flex {
    width: 100%;
  }

  .streak-dot {
    max-width: 10px;
    max-height: 10px;
  }

  .score-trend {
    height: 36px;
  }

  .spell-area {
    padding: 1.25rem;
  }

  .spell-meaning {
    font-size: 1rem;
  }

  .spell-input {
    max-width: 220px;
    padding: 0.6rem 0.85rem;
    font-size: 1rem;
  }

  .spell-letter-hint {
    font-size: 0.9rem;
  }
}
