/* ==========================================
   study.zzk0426.online - 学习计划网站
   配色：深色背景 + 蓝紫渐变
   ========================================== */

:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1e2a4a;
  --accent-1: #6c63ff;
  --accent-2: #00d4aa;
  --accent-3: #ff6b6b;
  --accent-4: #ffd93d;
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a82;
  --border: #2a2a45;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --gradient-1: linear-gradient(135deg, #6c63ff, #00d4aa);
  --gradient-2: linear-gradient(135deg, #ff6b6b, #ffd93d);
  --gradient-3: linear-gradient(135deg, #667eea, #764ba2);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========== 导航栏 ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(108, 99, 255, 0.1);
}

.nav-link.active {
  color: var(--accent-1);
}

/* ========== 容器 ========== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* ========== 欢迎横幅 ========== */
.hero {
  background: var(--gradient-3);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.hero h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  position: relative;
}

.hero p {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  position: relative;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-top: 12px;
  position: relative;
}

/* ========== 卡片网格 ========== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  transition: all 0.3s;
}

.card:hover {
  border-color: rgba(108, 99, 255, 0.3);
  box-shadow: 0 0 20px rgba(108, 99, 255, 0.05);
}

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

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-icon.english { background: rgba(108, 99, 255, 0.15); }
.card-icon.sql { background: rgba(0, 212, 170, 0.15); }
.card-icon.tax { background: rgba(255, 107, 107, 0.15); }
.card-icon.vba { background: rgba(255, 217, 61, 0.15); }

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== 进度条 ========== */
.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

.progress-fill.english { background: var(--gradient-1); }
.progress-fill.sql { background: var(--gradient-2); }
.progress-fill.tax { background: var(--accent-3); }
.progress-fill.vba { background: var(--accent-4); }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ========== 今日任务 ========== */
.task-list {
  list-style: none;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.task-item:last-child {
  border-bottom: none;
}

.task-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: transparent;
  font-size: 11px;
}

.task-check.done {
  background: var(--accent-1);
  color: #fff;
  border-color: var(--accent-1);
}

.task-content {
  flex: 1;
}

.task-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.task-name.done-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.task-time {
  font-size: 11px;
  color: var(--accent-1);
  white-space: nowrap;
  padding: 2px 8px;
  background: rgba(108, 99, 255, 0.1);
  border-radius: 4px;
}

/* ========== 打卡按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-1);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-large {
  padding: 14px 32px;
  font-size: 16px;
}

/* ========== 统计数字 ========== */
.stat-number {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== 连续天数徽章 ========== */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 217, 61, 0.1);
  border: 1px solid rgba(255, 217, 61, 0.25);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-4);
}

/* ========== 表格 ========== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.info-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.info-table tr:last-child td {
  border-bottom: none;
}

/* ========== 资料卡片 ========== */
.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.resource-card:hover {
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.resource-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.resource-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.resource-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== 阶段路线 ========== */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent-1);
}

.timeline-dot.active {
  background: var(--accent-1);
  box-shadow: 0 0 10px rgba(108, 99, 255, 0.3);
}

.timeline-dot.done {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.timeline-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-title {
  font-size: 14px;
  font-weight: 600;
}

.timeline-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ========== Toast 消息 ========== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: all 0.4s;
  z-index: 999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: var(--accent-2);
}

.toast.error {
  border-color: var(--accent-3);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 24px;
  }
  .hero h1 {
    font-size: 20px;
  }
  .container {
    padding: 16px;
  }
}
