/* Custom Styles & Animations */

/* 适配刘海屏底部安全距离 */
.pb-safe {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* 隐藏滚动条但允许滚动 */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* 简单的淡入动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* 首页统一抛光 */
.home-panel {
  border: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
}

.home-subpanel {
  border: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.home-muted-panel {
  border: 1px solid rgba(229, 231, 235, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-choice-button {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.home-primary-button {
  box-shadow: 0 16px 32px rgba(26, 86, 219, 0.28), 0 6px 14px rgba(26, 86, 219, 0.18);
}

.home-secondary-button {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.home-pill {
  letter-spacing: 0.08em;
}

.home-copy {
  font-size: 0.875rem;
  line-height: 1.65;
}

.home-pressable {
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
  will-change: transform;
}

.home-pressable:active {
  transform: scale(0.985);
}

@media (hover: hover) {
  .home-pressable:hover {
    transform: translateY(-1px);
    filter: saturate(1.02);
  }

  .home-panel.home-pressable:hover,
  .home-subpanel.home-pressable:hover,
  .home-choice-button.home-pressable:hover {
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1), 0 6px 16px rgba(15, 23, 42, 0.05);
  }

  .home-primary-button.home-pressable:hover {
    box-shadow: 0 20px 40px rgba(26, 86, 219, 0.3), 0 8px 16px rgba(26, 86, 219, 0.2);
  }
}

/* 自定义单选/多选框的基础样式 */
.option-card {
  transition: all 0.2s ease;
}

.option-card.selected {
  border-color: #1A56DB;
  background-color: #EFF6FF; /* blue-50 */
}

.option-card.saved {
  border-color: #93C5FD; /* blue-300 */
  background-color: #EFF6FF; /* blue-50 */
}

.option-card.saved .option-key {
  background-color: #1A56DB;
  color: white;
  border-color: #1A56DB;
}

.option-card.correct {
  border-color: #10B981;
  background-color: #D1FAE5;
}

.option-card.correct .option-key {
  background-color: #10B981;
  color: white;
  border-color: #10B981;
}

.option-card.wrong {
  border-color: #FCA5A5;
  background-color: #FEF2F2;
}

.option-card.wrong .option-key {
  background-color: #EF4444;
  color: white;
  border-color: #EF4444;
}

/* 选项字母气泡 */
.option-key {
  transition: all 0.2s ease;
}

.option-card.selected .option-key {
  background-color: #1A56DB;
  color: white;
  border-color: #1A56DB;
}

/* 答题卡网格项 */
.sheet-item {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem; /* rounded-xl */
  font-weight: 600;
  font-size: 0.875rem; /* text-sm */
  transition: all 0.15s ease;
}

.sheet-item.unanswered {
  background-color: #F9FAFB; /* gray-50 */
  color: #6B7280; /* gray-500 */
  border: 1px solid #E5E7EB; /* gray-200 */
}

.sheet-item.answered {
  background-color: #EFF6FF; /* blue-50 */
  color: #1D4ED8; /* blue-700 */
  border: 1px solid #93C5FD; /* blue-300 */
}

.sheet-item.review {
  background-color: #FFFBEB; /* amber-50 */
  color: #B45309; /* amber-700 */
  border: 1px solid #FCD34D; /* amber-300 */
}

.sheet-item.wrong {
  background-color: #FEF2F2; /* red-50 */
  color: #B91C1C; /* red-700 */
  border: 1px solid #FCA5A5; /* red-300 */
}

.sheet-item.current {
  ring: 2px solid #1A56DB;
  box-shadow: 0 0 0 2px #1A56DB;
}
