/**
 * NTMK Result & Gamification View Styling
 * Animated SVG score dial, achievement badges, and action buttons
 */

.result-card {
  max-width: 680px;
  margin: 30px auto;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

/* Score circle */
.score-circle {
  width: 170px;
  height: 170px;
  margin: 0 auto 20px;
  position: relative;
}

.score-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-bg {
  fill: none;
  stroke: var(--bg-alt, #f1f5f9);
  stroke-width: 9;
}

.score-fill {
  fill: none;
  stroke: url(#scoreGrad);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-value {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-color, #0f172a);
  line-height: 1;
}

.score-total {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dim, #94a3b8);
  margin-top: 4px;
}

.result-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-color, #0f172a);
  margin: 0 0 6px;
}

.result-message {
  font-size: 0.98rem;
  color: var(--text-dim, #64748b);
  margin: 0 0 24px;
}

/* Stats grid */
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.result-stats .stat {
  background: var(--bg-alt, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-stats .stat.correct .stat-num {
  color: #10b981;
}

.result-stats .stat.wrong .stat-num {
  color: #ef4444;
}

.result-stats .stat.time .stat-num {
  color: #3b82f6;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim, #64748b);
  font-weight: 600;
}

/* Action buttons */
.result-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 580px) {
  .result-actions-grid {
    grid-template-columns: 1fr;
  }
}

.btn-result-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-result-action.primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn-result-action.primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45);
}

.btn-result-action.secondary {
  background: var(--bg-alt, #f8fafc);
  color: var(--text-color, #334155);
  border-color: var(--border-color, #cbd5e1);
}

.btn-result-action.secondary:hover {
  background: var(--card-bg, #ffffff);
  border-color: #d97706;
  color: #b45309;
}

.btn-share-card {
  width: 100%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fbbf24;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 14px;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
  transition: all 0.15s ease;
}

.btn-share-card:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
}
