/* ============================================
   第九届全国青少年人工智能创新挑战赛
   智慧农场参赛选手查询系统 - 样式表
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  background: #f0f2f5;
  color: #1f2937;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 24px;
}

.page-header {
  text-align: center;
  margin-bottom: 32px;
}

.header-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.page-header h2 {
  font-size: 18px;
  font-weight: 500;
  color: #4b5563;
}

.main-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  padding: 36px 32px;
  margin-bottom: 24px;
}

.search-section {
  width: 100%;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.section-desc {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.required {
  color: #dc2626;
  margin-left: 2px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: #111827;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
  color: #9ca3af;
}

.form-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #ffffff;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-msg {
  margin-top: 16px;
  padding: 12px 14px;
  font-size: 14px;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  display: none;
}

.error-msg.show {
  display: block;
}

.page-footer {
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}

/* ============================================
   模态框 - 准考证样式
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  width: 100%;
  max-width: 480px;
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ticket-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.ticket-header {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  text-align: center;
  padding: 28px 24px 22px;
  position: relative;
}

.ticket-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.ticket-header h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ticket-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

.ticket-body {
  padding: 24px 28px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  flex-shrink: 0;
  margin-right: 16px;
}

.info-value {
  font-size: 15px;
  color: #111827;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.info-value.highlight {
  color: #1d4ed8;
  font-size: 16px;
}

.ticket-notice {
  background: #f0f7ff;
  padding: 14px 28px;
  border-top: 1px solid #dbeafe;
}

.ticket-notice p {
  font-size: 12px;
  color: #3b82f6;
  line-height: 1.6;
  text-align: center;
}

.ticket-footer {
  padding: 16px 28px 24px;
  text-align: center;
}

.btn-close {
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-close:hover {
  background: #e5e7eb;
  color: #111827;
}

/* 任务下载弹窗 */
.download-body {
  padding: 20px 28px;
  max-height: 360px;
  overflow-y: auto;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 10px;
  transition: background 0.2s;
}

.download-item:hover {
  background: #f3f4f6;
}

.download-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.download-name {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  word-break: break-all;
}

.download-size {
  font-size: 12px;
  color: #9ca3af;
}

.download-btn {
  flex-shrink: 0;
  margin-left: 12px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

body.modal-open {
  overflow: hidden;
}
