:root {
  --navy-primary: #0B1F3A;
  --navy-secondary: #163A63;
  --white: #FFFFFF;
  --bg-light: #F5F8FC;
  --accent: #D4AF37;
  --text-muted: #5A6B85;
  --error-red: #B3261E;
  --error-bg: #FDECEC;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-card: 0 10px 30px rgba(11, 31, 58, 0.12), 0 2px 8px rgba(11, 31, 58, 0.06);
  --touch-target: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-light) 0%, #EAF0F8 100%);
  color: var(--navy-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  padding: 32px 0 20px;
  text-align: center;
}

.logo-placeholder {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--navy-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 16px rgba(11, 31, 58, 0.25);
}

.main-heading {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 800;
  color: var(--navy-primary);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* Content */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 22px 26px;
}

/* Search card */
.instruction {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 24px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.student-id-input {
  width: 100%;
  height: var(--touch-target);
  font-size: 18px;
  font-weight: 600;
  font-family: inherit;
  color: var(--navy-primary);
  background: var(--bg-light);
  border: 2px solid #DDE6F2;
  border-radius: var(--radius-md);
  padding: 0 16px;
  letter-spacing: 0.03em;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.student-id-input::placeholder {
  color: #9AACC4;
  font-weight: 500;
  letter-spacing: normal;
}

.student-id-input:focus {
  outline: none;
  border-color: var(--navy-secondary);
  background: var(--white);
}

.student-id-input[aria-invalid="true"] {
  border-color: var(--error-red);
}

.form-error {
  min-height: 20px;
  color: var(--error-red);
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
}

/* Buttons */
.btn-primary {
  width: 100%;
  height: var(--touch-target);
  margin-top: 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--navy-primary);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:hover {
  background: var(--navy-secondary);
}

.btn-primary:disabled {
  opacity: 0.75;
  cursor: default;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: var(--white);
  border-radius: 50%;
}

.btn-primary.loading .btn-spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

.btn-primary.loading .btn-text {
  opacity: 0.85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-secondary {
  width: 100%;
  height: var(--touch-target);
  margin-top: 22px;
  border: 2px solid var(--navy-primary);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--navy-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:active {
  background: var(--bg-light);
}

/* Message cards (not found / error) */
.message-card {
  text-align: center;
}

.message-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--error-bg);
  color: var(--error-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.message-text {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--navy-primary);
  line-height: 1.5;
  margin: 0;
}

/* Result card */
.result-card {
  padding: 0;
  overflow: hidden;
}

.result-header {
  background: var(--navy-primary);
  color: var(--white);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 16px 20px;
}

.result-name-block {
  text-align: center;
  padding: 24px 22px 18px;
  border-bottom: 1px solid #EEF2F8;
}

.result-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.result-name {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: var(--navy-primary);
  line-height: 1.3;
  word-break: break-word;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px 0;
}

.result-item {
  padding: 16px 20px;
  border-bottom: 1px solid #EEF2F8;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-item:nth-child(odd) {
  border-right: 1px solid #EEF2F8;
}

.result-item-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.result-item-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-secondary);
}

.congratulations {
  text-align: center;
  font-family: 'Dancing Script', cursive;
  font-size: clamp(30px, 9vw, 40px);
  font-weight: 700;
  color: var(--accent);
  margin: 18px 0 4px;
  padding: 0 20px;
}

.result-card .btn-secondary {
  margin: 20px 20px 22px;
  width: calc(100% - 40px);
}

/* Footer */
.footer {
  text-align: center;
  padding: 18px 12px 28px;
}

.footer p {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
}

/* Responsive tweaks */
@media (min-width: 480px) {
  .page { padding: 0 24px; }
  .card { padding: 34px 30px 30px; }
  .result-name-block { padding: 28px 30px 20px; }
  .result-item { padding: 18px 24px; }
  .result-card .btn-secondary { margin: 22px 24px 26px; width: calc(100% - 48px); }
}

@media (min-width: 768px) {
  .header { padding: 48px 0 28px; }
}
