/* ==========================================================================
   Student CSS - Landing Page, Code Lookup & Result Presentation (Mobile Friendly)
   ========================================================================== */

/* Public Layout Container */
.student-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem;
  width: 100%;
}

/* Header & Logo */
.center-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.brand-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
  margin-bottom: 1rem;
}

.brand-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--secondary);
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* Code Entry Card */
.code-entry-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.code-input-large {
  font-family: monospace, sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  padding: 1rem;
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary-dark);
  margin: 1.5rem 0;
  direction: ltr;
  max-width: 100%;
}

.code-input-large::placeholder {
  letter-spacing: 2px;
  font-weight: 500;
  color: #93c5fd;
  opacity: 0.7;
}

/* Student Profile Header Card */
.student-profile-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.student-name-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.student-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.95rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Current Week Result Featured Hero Card */
.hero-result-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.week-badge-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

/* Big Score Circle & Numbers */
.score-display-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}

.percentage-badge-huge {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.score-fraction {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
}

.score-progress-bar {
  width: 100%;
  height: 12px;
  background-color: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 1.25rem 0;
}

.score-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: width 0.8s ease-out;
}

/* Performance Indicator Tag */
.grade-tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
}

.grade-excellent { background-color: #d1fae5; color: #047857; }
.grade-very-good { background-color: #e0f2fe; color: #0369a1; }
.grade-good { background-color: #fef3c7; color: #b45309; }
.grade-needs-work { background-color: #fee2e2; color: #b91c1c; }

/* Previous Weeks Results Section */
.previous-weeks-section {
  margin-top: 2rem;
}

.section-title-rtl {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 1.25rem;
}

.history-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.history-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.history-week {
  font-weight: 800;
  color: var(--secondary);
  font-size: 1.05rem;
}

.history-test {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.history-score-box {
  text-align: left;
  direction: ltr;
}

.history-percentage {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}

.history-raw-score {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .student-container {
    padding: 1.25rem 0.75rem;
  }
  .code-entry-card {
    padding: 1.5rem 1rem;
  }
  .code-input-large {
    font-size: 1.4rem;
    letter-spacing: 2px;
    padding: 0.75rem 0.5rem;
  }
  .percentage-badge-huge {
    font-size: 2.75rem;
  }
  .hero-result-card {
    padding: 1.25rem;
  }
  .student-profile-card {
    padding: 1.25rem;
  }
  .student-name-title {
    font-size: 1.35rem;
  }
}
