@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden !important;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

:root {
  --bg: #fef6e4;
  --headline: #001858;
  --paragraph: #172c66;
  --button: #f582ae;
  --button-text: #001858;
  --main: #f3d2c1;
  --secondary: #8bd3dd;
  --tertiary: #f582ae;
  --card-bg: #ffffff;
  --border: #f3d2c1;
}

body {
  font-family: 'Poppins', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--paragraph);
  min-height: 100vh;
  overflow: hidden;
  cursor: default;
}

/* 后台页面允许滚动 */
body:has(.admin-panel.show) {
  overflow-y: auto;
  overflow-x: hidden;
}

/* ============ 大屏页面 ============ */
.screen-page {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px 30px; /* 减少padding */
}

/* 顶部区域 */
.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  min-height: 100px;
  margin-bottom: 1vh;
}

.header-left {
  min-width: 180px;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  z-index: 10;
}

#current-time {
  font-size: clamp(3.2rem, 5.5vh, 5.5rem);
  font-weight: 700;
  color: var(--headline);
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#current-date {
  font-size: clamp(1.3rem, 2.5vh, 1.8rem);
  color: var(--paragraph);
  opacity: 0.7;
  margin-top: 5px;
}

/* 隐藏的教师入口 */
.teacher-hidden {
  width: 24px;
  height: 24px;
  background: var(--paragraph);
  border-radius: 50%;
  opacity: 0.15;
  cursor: pointer;
  transition: opacity 0.3s;
  border: none;
  padding: 0;
}

.teacher-hidden:hover {
  opacity: 0.3;
}

/* 公告横幅 */
.announcement-bar {
  background: linear-gradient(90deg, var(--tertiary), var(--button));
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  animation: slideDown 0.5s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.announcement-icon {
  font-size: 2rem;
  animation: megaphone 1.5s ease-in-out infinite;
}

@keyframes megaphone {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  75% { transform: scale(1.1) rotate(5deg); }
}

.announcement-content {
  flex: 1;
  text-align: left;
}

.announcement-label {
  font-size: 0.8rem;
  opacity: 0.85;
  letter-spacing: 3px;
  margin-bottom: 2px;
}

.announcement-text {
  font-size: clamp(1.2rem, 2.5vh, 1.5rem);
  font-weight: 600;
  margin-bottom: 2px;
  white-space: pre-wrap;
  line-height: 1.3;
}

.announcement-time {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* 课程内容区域 - 严格一屏约束 */
.screen-content {
  flex: 1;
  display: flex;
  gap: 15px;
  min-height: 0;
  overflow: hidden; /* 整体不滚动 */
}

/* 确保卡片内容不溢出 */
.content-card {
  flex: 1;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  min-height: 0; /* 允许内部滚动 */
  overflow: hidden;
}

.content-card {
  flex: 1; /* 4 张卡片等宽 */
  background: var(--card-bg);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  border: 3px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0; /* 严格约束 */
}

.content-card:last-child {
  flex: 1; /* 与其他卡片等宽 */
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-shrink: 0;
}

.card-icon {
  width: 50px;
  height: 50px;
  background: var(--main);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-title {
  font-size: clamp(1.3rem, 2.5vh, 1.6rem);
  color: var(--headline);
  font-weight: 600;
}

.card-content {
  flex: 1;
  font-size: clamp(1.04rem, 2vh, 1.36rem);
  line-height: 1.3;
  color: var(--paragraph);
  overflow: hidden;
  word-break: break-word;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  white-space: pre-wrap;
}

/* 词汇内容特殊处理 */
.vocab-container {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 12px);
  width: 100%;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 12px;
}

/* 滚动条智能显示：内容溢出时才显示 */
.vocab-container::-webkit-scrollbar {
  width: 10px;
}

.vocab-container::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.08);
  border-radius: 5px;
}

.vocab-container::-webkit-scrollbar-thumb {
  background: var(--tertiary);
  border-radius: 5px;
  border: 2px solid rgba(255,255,255,0.5);
}

.vocab-container::-webkit-scrollbar-thumb:hover {
  background: var(--button);
}

/* 内容不溢出时隐藏滚动条 */
.vocab-container.no-scroll {
  overflow-y: hidden;
  padding-right: 8px;
}

/* 自定义滚动条样式（美观） */
.vocab-container::-webkit-scrollbar {
  width: 10px;
}

.vocab-container::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.08);
  border-radius: 5px;
}

.vocab-container::-webkit-scrollbar-thumb {
  background: var(--tertiary);
  border-radius: 5px;
  border: 2px solid rgba(255,255,255,0.5);
}

.vocab-container::-webkit-scrollbar-thumb:hover {
  background: var(--button);
}

.vocab-pill {
  width: 100%;
  box-sizing: border-box;
  padding: clamp(6px, 1.2vh, 12px) clamp(12px, 2vw, 20px);
  background: var(--secondary);
  color: white;
  border-radius: 12px;
  font-size: clamp(1.1rem, 2.2vh, 1.5rem);
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  flex-shrink: 0;
}

/* 要点列表 */
.points-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.point-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.point-bullet {
  font-size: clamp(0.9rem, 1.8vh, 1rem);
  margin-top: 2px;
  flex-shrink: 0;
}

.point-text {
  font-size: clamp(0.95rem, 1.9vh, 1.05rem);
  line-height: 1.5;
}

/* 无课程卡片 */
.class-status-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 10px 40px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  border: 3px solid var(--border);
  position: relative;
  overflow: hidden;
  min-width: 300px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.class-status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--secondary), var(--button));
}

.status-label {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.status-time {
  font-size: 2rem;
  font-weight: 700;
  color: var(--headline);
}

.no-class-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  border: 3px solid var(--border);
}

.no-class-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 加深公告横幅背景 */
.announcement-bar {
  background: linear-gradient(90deg, #d86a96, var(--button)); /* 更深的渐变 */
}
/* Toast 通知 */
.toast {
  position: fixed;
  top: 20px;
  right: -200px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  transition: right 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.toast.show {
  right: 20px;
}

.toast.success {
  background: #2ecc71;
}

.toast.error {
  background: #e74c3c;
}

.toast.info {
  background: var(--secondary);
}
}

/* 按钮状态反馈 */
.btn:active {
  transform: scale(0.97);
}

.btn:focus {
  box-shadow: 0 0 0 3px rgba(245,130,174,0.3);
}

/* 管理后台响应式适配 */
@media (max-width: 768px) {
  .screen-header {
    padding: 0 10px;
  }
  
  .header-left {
    min-width: 120px;
  }
  
  #current-time {
    font-size: clamp(2rem, 6vh, 3rem);
  }
  
  #current-date {
    font-size: clamp(0.8rem, 1.8vh, 1.1rem);
  }
  
  .screen-content {
    flex-direction: column;
    gap: 12px;
  }
  
  .content-card {
    flex: none;
    height: 20vh;
    min-height: 120px;
  }
  
  .card-title {
    font-size: clamp(0.9rem, 2.5vh, 1.1rem);
  }
  
  .card-content {
    font-size: clamp(0.85rem, 1.8vh, 1rem);
  }
  
  .admin-content {
    padding: 15px 16px;
  }
  
  .admin-section {
    padding: 18px;
  }
  
  /* 后台手机端优化 */
  .admin-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .header-actions {
    flex-wrap: wrap;
  }
  
  .header-actions .btn {
    padding: 7px 14px;
    font-size: 0.85rem;
  }
  
  .announcement-status {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word;
  }
  
  .announcement-status .content {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }
  
  .schedule-table {
    display: none;
  }
  
  .editor-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .editor-row label {
    width: auto;
    padding-top: 0;
    white-space: normal;
  }
  
  .editor-row textarea {
    width: 100%;
    box-sizing: border-box;
  }
  
  .course-card .delete-btn {
    opacity: 1;
  }
  
  .course-card .edit-btn {
    opacity: 1;
  }
}

.no-class-title {
  font-size: clamp(1.5rem, 3vh, 2rem);
  color: var(--headline);
  margin-bottom: 8px;
  font-weight: 600;
}

.no-class-hint {
  font-size: clamp(0.9rem, 2vh, 1.1rem);
  color: var(--paragraph);
  opacity: 0.6;
}

/* 底部倒计时 */
.screen-footer {
  text-align: center;
  padding: 15px;
  margin-top: 10px;
}

.countdown-text {
  font-size: clamp(1.5rem, 3vh, 2.2rem);
  color: var(--secondary);
  font-weight: 600;
  background: rgba(139, 211, 221, 0.15);
  padding: 10px 20px;
  border-radius: 30px;
  display: inline-block;
  animation: pulse 2s infinite;
}

.countdown-text.started {
  color: var(--button);
  animation: breathe 1.5s ease-in-out infinite;
  background: rgba(245, 130, 174, 0.15);
}

.countdown-text.urgent {
  color: #e74c3c;
  font-size: clamp(1.4rem, 2.8vh, 2rem);
  animation: urgentPulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes urgentPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* 数据刷新指示器 */
.refresh-indicator {
  position: fixed;
  bottom: 5px;
  right: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2ecc71;
  opacity: 0;
  transition: opacity 0.3s;
}

.refresh-indicator.success {
  opacity: 1;
  animation: flashSuccess 0.5s;
}

.refresh-indicator.error {
  background: #e74c3c;
  opacity: 1;
}

@keyframes flashSuccess {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(2); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============ 弹窗 ============ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 15px 50px rgba(0,0,0,0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-card {
  transform: scale(1);
}

.modal-card h2 {
  color: var(--headline);
  margin-bottom: 18px;
  font-size: clamp(1.2rem, 2.5vh, 1.4rem);
}

.modal-card input,
.modal-card textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: clamp(0.9rem, 2vh, 1rem);
  margin-bottom: 12px;
  font-family: inherit;
  background: white;
  position: relative;
}

.modal-card input:focus,
.modal-card textarea:focus {
  outline: none;
  border-color: var(--button);
}

.modal-card input::before {
  content: attr(data-placeholder);
  position: absolute;
  left: 16px;
  top: 12px;
  font-size: inherit;
  color: #999;
  pointer-events: none;
}

.modal-card input:focus::before,
.modal-card input:not(:placeholder-shown)::before {
  display: none;
}

.modal-card textarea {
  min-height: 90px;
  resize: vertical;
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  font-size: clamp(0.9rem, 2vh, 1rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  min-height: 44px; /* 手机触摸区域 */
}

.btn-primary {
  background: var(--button);
  color: var(--button-text);
  flex: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(245, 130, 174, 0.4);
}

.btn-secondary {
  background: var(--main);
  color: var(--headline);
}

.btn-disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
}

/* 登录错误提示 */
.login-error {
  background: rgba(231, 76, 60, 0.1);
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
  animation: shake 0.6s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ============ 管理面板 ============ */
.admin-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 999;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s ease;
}

.admin-panel.show {
  display: flex;
  transform: translateX(0);
}

.admin-header {
  display: flex;
  justify-content: center;
  padding: 18px 30px;
  background: var(--card-bg);
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.admin-header-inner {
  max-width: 860px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  color: var(--headline);
  font-size: clamp(1.2rem, 2.5vh, 1.4rem);
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.admin-content {
  flex: 1;
  overflow-y: visible;
  padding: 20px 30px;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* 自定义滚动条 */
.admin-content::-webkit-scrollbar {
  width: 8px;
}

.admin-content::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}

.admin-content::-webkit-scrollbar-thumb {
  background: var(--main);
  border-radius: 4px;
}

.admin-content::-webkit-scrollbar-thumb:hover {
  background: var(--button);
}

.admin-section {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.admin-section h3 {
  color: var(--headline);
  margin-bottom: 12px;
  font-size: clamp(1rem, 2vh, 1.1rem);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 公告状态卡片 */
.announcement-status {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  word-break: break-word;
}

.announcement-status .label {
  font-size: 0.85rem;
  color: var(--paragraph);
  opacity: 0.6;
  margin-bottom: 4px;
}

.announcement-status .content {
  font-size: 1rem;
  color: var(--headline);
  margin-top: 3px;
  line-height: 1.5;
}

/* 课程告示板 */
.next-class-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.editor-row label {
  font-weight: 500;
  color: var(--headline);
  flex-shrink: 0;
  font-size: clamp(0.85rem, 1.8vh, 0.95rem);
  white-space: normal;
  width: 100%;
}

.editor-row textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: clamp(0.9rem, 2vh, 1rem);
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
}

.editor-row textarea:focus {
  outline: none;
  border-color: var(--button);
}

/* 课表 */
.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.add-course-btn {
  background: var(--button);
  color: var(--button-text);
  border: none;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.schedule-table {
  width: 100%;
  border-collapse: separate; /* 改为separate以保持圆角 */
  border-spacing: 0;
  margin-top: 12px;
}

.schedule-table th,
.schedule-table td {
  border: 2px solid var(--border);
  padding: 12px 8px;
  text-align: center;
  width: 16.6%;
}

.schedule-table th:first-child,
.schedule-table td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.schedule-table th:last-child,
.schedule-table td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.schedule-table th {
  background: var(--main);
  color: var(--headline);
  font-weight: 600;
}

.schedule-table .time-cell {
  background: var(--bg);
  font-weight: 600;
  color: var(--headline);
  font-size: 0.9rem;
}

.schedule-table .has-course {
  background: var(--secondary);
  color: white;
  font-weight: 500;
  border-radius: 6px;
  padding: 6px;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  margin-bottom: 4px;
}

.schedule-table .has-course:last-child {
  margin-bottom: 0;
}

.schedule-table .empty-slot {
  color: #999;
  font-style: italic;
  font-size: 0.8rem;
}

/* 课程卡片列表 */
.course-list {
  margin-top: 18px;
}

.course-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 10px;
  margin-bottom: 8px;
}

.course-card .info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.course-card .time-badge {
  background: var(--secondary);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.course-card .actions {
  display: flex;
  gap: 8px;
}

.course-card .edit-btn {
  background: none;
  border: none;
  color: #3498db;
  cursor: pointer;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit;
  opacity: 1;
  transition: background 0.3s;
}

.course-card .edit-btn:hover {
  background: rgba(52, 152, 219, 0.1);
}

.course-card .delete-btn {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit;
  opacity: 1;
  transition: background 0.3s;
}

.course-card .delete-btn:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* 添加课程表单 */
.add-course-form {
  display: flex;
  flex-direction: column; /* 改为纵向排列 */
  gap: 12px;
}

.form-left {
  width: auto;
  flex-shrink: 0;
}

.form-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--paragraph);
  font-weight: 500;
}

.form-group select {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  cursor: pointer;
  appearance: none; /* 自定义下拉箭头 */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23172c66' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 35px;
}

.form-group select:focus {
  outline: none;
  border-color: var(--button);
}

.time-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.time-row select {
  flex: 1;
}

/* 网址显示 */
.url-display {
  background: var(--bg);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.url-display code {
  flex: 1;
  font-family: 'Courier New', monospace;
  color: var(--headline);
  word-break: break-all;
  background: rgba(255,255,255,0.5);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.copy-btn {
  background: var(--button);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: var(--button-text);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Loading */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg);
  font-size: clamp(1rem, 2vh, 1.2rem);
  color: var(--paragraph);
  z-index: 9999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(245, 130, 174, 0.2);
  border-top: 4px solid var(--button);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Toast通知 */
/* 渐变遮罩 - 词汇卡片底部 */
.vocab-gradient-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  width: calc(100% - 12px);
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 1;
  z-index: 10;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.vocab-gradient-mask.hide {
  opacity: 0;
}
