body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: #f5f5f5;
  position: relative;
}

.stop-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #e74c3c;
  color: white;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.stop-btn:hover { background: #c0392b; }

h1 { margin-bottom: 2rem; }

.card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.label { color: #666; margin: 0; }

.word {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0;
}

.speak-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
  margin: 0.2rem 0;
}

.translation {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0;
  min-height: 1.5rem;
}

input {
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  padding: 0.6rem;
  font-size: 1rem;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover { background: #357abd; }

#loginBtn {
  padding: 1rem 2.5rem;
  font-size: 1.3rem;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

#subjects {
  align-items: center;
}

#subjects button {
  padding: 1rem 2.5rem;
  font-size: 1.3rem;
  border-radius: 8px;
  width: 100%;
}

.feedback { margin: 0; font-weight: bold; }
.correct { color: green; }
.nearly { color: orange; }
.wrong { color: red; }
.phase { margin: 0; font-size: 0.9rem; color: #555; }
.summary { margin: 0; font-size: 0.85rem; color: #888; }
.subtitle { font-size: 0.9rem; color: #888; margin: -1.5rem 0 1rem; }
#subjectLabel { text-align: left; font-weight: bold; max-width: 400px; margin: 0.75rem auto 0.5rem; }
.timer { margin: 0; font-size: 1.4rem; color: #888; text-align: right; }
.timer.urgent { color: red; font-weight: bold; }

#greeting {
  font-family: "Varela Round", sans-serif;
  font-size: 1.6rem;
  margin: 0.5rem 0 1.5rem;
  color: #333;
}

.last-session {
  font-family: "Varela Round", sans-serif;
  font-size: 1rem;
  color: #555;
  margin: 0 auto 1.5rem;
  max-width: 400px;
  text-align: left;
}
.last-session ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.last-session li {
  padding: 0.3rem 0;
}
.last-session li::before {
  content: "– ";
  color: #888;
}

#roundFeedback {
  font-family: "Varela Round", sans-serif;
  font-size: 1.4rem;
  margin: 1.5rem 0;
  color: green;
  text-align: center;
}
#roundFeedback:empty { display: none; }

.progress-bar {
  background: #e0e0e0;
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.progress-fill {
  background: linear-gradient(90deg, #4caf50, #81c784);
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 8px;
}
#streak {
  font-family: "Varela Round", sans-serif;
  font-size: 1.3rem;
  margin: 0.5rem 0 2rem;
  color: #e65100;
}
#streak:empty { display: none; }

.explosion {
  position: fixed;
  top: 50%;
  left: 50%;
  font-size: 5rem;
  transform: translate(-50%, -50%) scale(0);
  animation: explode 3s ease-out forwards;
  pointer-events: none;
  z-index: 9999;
}
@keyframes explode {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

.admin-btn {
  font-family: "Varela Round", sans-serif;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  background: #607d8b;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.admin-btn:hover { background: #455a64; }

.coin-summary {
  color: #f9a825;
  font-weight: bold;
  font-family: "Varela Round", sans-serif;
}

.coin-total {
  font-family: "Varela Round", sans-serif;
  font-size: 1.2rem;
  color: #f9a825;
  font-weight: bold;
  margin: 0.5rem 0 1rem;
}

.coin-popup {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  font-family: "Varela Round", sans-serif;
  font-size: 2.5rem;
  font-weight: bold;
  color: #f9a825;
  pointer-events: none;
  z-index: 9999;
  animation: coinPop 2s ease-out forwards;
}
@keyframes coinPop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  50% { transform: translate(-50%, -70%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -100%) scale(0.8); opacity: 0; }
}
