/* ===== NAV XP BADGE (shared) ===== */
.nav-xp {
  background: linear-gradient(135deg, #5b5ef4, #7209b7);
  color: white; font-weight: 800; font-size: 0.8rem;
  padding: 0.3rem 0.8rem; border-radius: 50px;
}

/* ===== HERO ===== */
.hw-hero {
  padding: 3rem 4rem 2rem;
  background: linear-gradient(145deg, #eef0ff 0%, #fce7ff 50%, #fff0e8 100%);
  text-align: center;
}
.hw-hero h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: 0.5rem; }
.hw-hero p { color: var(--muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ===== CONTAINER ===== */
.hw-container { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ===== UPLOAD CARD ===== */
.hw-upload-card {
  background: white; border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow);
  border: 2px solid rgba(91,94,244,0.08);
}
.hw-title-row { margin-bottom: 1.25rem; }
.hw-label { font-weight: 800; font-size: 0.85rem; display: block; margin-bottom: 0.4rem; color: var(--text); }
.hw-input {
  width: 100%; padding: 0.75rem 1rem;
  border: 2px solid #e8eaff; border-radius: 14px;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 700;
  outline: none; color: var(--text); transition: border-color 0.2s;
}
.hw-input:focus { border-color: var(--primary); }

/* ===== DROPZONE ===== */
.hw-dropzone {
  border: 3px dashed #d0d4f8; border-radius: 20px;
  padding: 2.5rem 1.5rem; text-align: center;
  cursor: pointer; transition: all 0.25s;
  background: rgba(91,94,244,0.02);
  position: relative;
}
.hw-dropzone.dragover {
  border-color: var(--primary); background: rgba(91,94,244,0.06);
  transform: scale(1.01);
}
.dropzone-icon { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.dropzone-text { font-weight: 800; font-size: 1.05rem; color: var(--text); margin-bottom: 0.3rem; }
.dropzone-sub { font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem; }
.dropzone-btn { pointer-events: none; }

/* ===== FILE PREVIEW ===== */
.hw-file-preview {
  display: flex; align-items: center; gap: 0.75rem;
  background: #f0f2ff; border-radius: 14px; padding: 0.75rem 1rem;
  margin-top: 1rem;
}
.fp-icon { font-size: 1.2rem; }
.fp-name { font-weight: 800; font-size: 0.9rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-size { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.fp-remove {
  background: rgba(220,38,38,0.1); border: none; color: #dc2626;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.fp-remove:hover { background: rgba(220,38,38,0.2); }

/* ===== UPLOAD BUTTON ===== */
.hw-upload-btn {
  width: 100%; margin-top: 1.25rem; justify-content: center;
  font-size: 1.05rem; padding: 1rem;
}
.hw-upload-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.spinner {
  width: 18px; height: 18px; border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.6s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== FEEDBACK SECTION ===== */
.hw-feedback-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.hw-feedback-header h2 {
  text-align: left; font-size: 1.6rem;
}
.hw-score-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; border-radius: 16px; padding: 0.75rem 1.5rem;
  text-align: center; box-shadow: 0 6px 24px rgba(91,94,244,0.35);
}
.score-label { font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; display: block; opacity: 0.8; }
.score-value { font-size: 2rem; font-weight: 900; line-height: 1; }

/* ===== FEEDBACK CARDS ===== */
.hw-feedback-list { display: flex; flex-direction: column; gap: 1rem; }
.fb-card {
  background: white; border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); border-left: 5px solid;
  transition: transform 0.2s;
}
.fb-card:hover { transform: translateX(4px); }
.fb-card.correct { border-left-color: var(--green); }
.fb-card.wrong { border-left-color: #f87171; }
.fb-q-header {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.fb-status-icon { font-size: 1.2rem; }
.fb-q-label { font-weight: 900; font-size: 0.95rem; color: var(--text); }
.fb-answer { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.3rem; }
.fb-answer strong { color: var(--text); }
.fb-explanation {
  font-size: 0.88rem; color: var(--text); line-height: 1.7;
  background: var(--bg); border-radius: 12px; padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}

/* ===== PRACTICE QUESTIONS ===== */
.hw-practice { margin-top: 2rem; }
.hw-practice h3 { font-size: 1.2rem; font-weight: 900; margin-bottom: 1rem; }
.hw-practice-list { display: flex; flex-direction: column; gap: 0.75rem; }
.practice-card {
  background: white; border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow); border: 2px solid #eeeeff;
}
.practice-card .pc-q { font-weight: 800; font-size: 0.92rem; margin-bottom: 0.5rem; }
.practice-card .pc-hint { font-size: 0.82rem; color: var(--muted); font-style: italic; }

/* ===== PAST HOMEWORK ===== */
.hw-past-section { background: var(--bg); }
.hw-past-section h2 { font-size: 1.6rem; }
.hw-past-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.hw-empty {
  text-align: center; padding: 2.5rem; color: var(--muted);
  font-size: 0.95rem; font-weight: 700;
}
.past-card {
  display: flex; align-items: center; gap: 1rem;
  background: white; border-radius: var(--radius); padding: 1rem 1.25rem;
  box-shadow: var(--shadow); transition: all 0.2s;
  border: 2px solid transparent;
}
.past-card:hover { border-color: rgba(91,94,244,0.15); transform: translateX(4px); }
.past-icon { font-size: 1.5rem; }
.past-info { flex: 1; }
.past-title { font-weight: 800; font-size: 0.95rem; }
.past-date { font-size: 0.78rem; color: var(--muted); }
.past-score {
  font-weight: 900; font-size: 1.1rem; padding: 0.3rem 0.8rem;
  border-radius: 50px; min-width: 60px; text-align: center;
}
.past-score.high { background: rgba(6,214,160,0.15); color: #059669; }
.past-score.mid { background: rgba(251,191,36,0.15); color: #b45309; }
.past-score.low { background: rgba(248,113,113,0.15); color: #dc2626; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hw-hero { padding: 2rem 1.5rem 1.5rem; }
  .hw-hero h1 { font-size: 1.6rem; }
  .hw-container { padding: 1.5rem 1rem; }
  .hw-upload-card { padding: 1.25rem; }
  .hw-dropzone { padding: 1.5rem 1rem; }
  .hw-feedback-header { flex-direction: column; align-items: flex-start; }
}
