/* Riyazi Məşq Oyunu Xüsusi Stilləri */

.practice-container {
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Config Section */
.config-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.config-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: #C7D2FE;
}

.chips-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip {
  flex: 1;
  min-width: 70px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.16);
}

.chip.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Game View Layout */
.practice-game-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.1rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.stat-val {
  color: white;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, #6366F1, #38BDF8);
  border-radius: var(--radius-full);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Equation Display Box */
.question-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.equation-display {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: white;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  text-align: center;
}

/* Answer Input & Submit */
.answer-form {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
}

.answer-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  padding: 0.6rem 1rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.answer-input:focus {
  border-color: #818CF8;
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.4), inset 0 2px 4px rgba(0,0,0,0.3);
}

/* Remove number input spinners */
.answer-input::-webkit-outer-spin-button,
.answer-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.answer-input[type=number] {
  -moz-appearance: textfield;
}

/* On-Screen Keypad */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.num-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.num-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.num-btn:active {
  transform: scale(0.95);
}

.num-btn.btn-action {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}

.num-btn.btn-submit-pad {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Floating Feedback Popup */
.feedback-pop {
  position: absolute;
  top: -15px;
  right: 20px;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 900;
  font-size: 1rem;
  animation: floatUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: none;
  z-index: 10;
}

.feedback-pop.correct {
  background: #10B981;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.feedback-pop.wrong {
  background: #EF4444;
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(10px) scale(0.8); }
  30% { opacity: 1; transform: translateY(-5px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-25px) scale(1); }
}

/* Result summary cards inside GameOver modal */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.result-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  text-align: center;
}

.result-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.result-card-val {
  font-size: 1.4rem;
  font-weight: 900;
}

.val-success { color: #34D399; }
.val-danger { color: #F87171; }
.val-time { color: #38BDF8; }
.val-score { color: #FBBF24; }

@media (max-width: 480px) {
  .equation-display { font-size: 2.25rem; }
  .answer-input { font-size: 1.4rem; }
  .num-btn { font-size: 1.2rem; padding: 0.65rem; }
  .results-grid { grid-template-columns: 1fr 1fr; }
}
