/* ===================================================
   测评系统 - 主样式表
   风格：腾讯云 / 火山引擎
   =================================================== */

/* ===== CSS 变量 ===== */
:root {
  --primary: #0052d9;
  --primary-dark: #193db8;
  --primary-light: #e8f0fe;
  --primary-gradient: linear-gradient(135deg, #0052d9 0%, #193db8 100%);
  --primary-gradient-hover: linear-gradient(135deg, #0066ff 0%, #224ac8 100%);
  --success: #00a870;
  --warning: #ff9f00;
  --danger: #e34d59;
  --info: #0088ff;
  --text-primary: #1a1a2e;
  --text-secondary: #5a6072;
  --text-muted: #8c8f9e;
  --bg-body: #f4f6f9;
  --bg-card: #ffffff;
  --bg-sidebar: #1a1a2e;
  --border-color: #e5e8ef;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html { font-size: 14px; }

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: var(--font-family);
  text-decoration: none;
}

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

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 4px rgba(0, 82, 217, 0.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-gradient-hover);
  box-shadow: 0 4px 12px rgba(0, 82, 217, 0.4);
  transform: translateY(-1px);
  color: #fff;
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-block { width: 100%; }

.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius-md); }

/* ===== Forms ===== */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}

.form-input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--text-primary);
  background: #f8f9fd;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.25s ease;
}

.form-input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.12);
}

.form-input::placeholder { color: var(--text-muted); }

.toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 15px;
  transition: color 0.2s;
}
.toggle-pwd:hover { color: var(--text-secondary); }

.form-error {
  background: #fef2f2;
  color: var(--danger);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  border: 1px solid #fecaca;
}

/* ===== Captcha ===== */
.captcha-row { display: flex; gap: 10px; align-items: center; }

.captcha-img {
  width: 130px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid var(--border-color);
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.captcha-img:hover { border-color: var(--primary); }

/* ===== Auth Pages (Login/Register) ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  overflow: hidden;
  position: relative;
}

.auth-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.auth-bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.auth-bg-circle.c1 {
  width: 500px; height: 500px;
  background: var(--primary);
  top: -150px; right: -100px;
}
.auth-bg-circle.c2 {
  width: 400px; height: 400px;
  background: #7c3aed;
  bottom: -100px; left: -100px;
}
.auth-bg-circle.c3 {
  width: 300px; height: 300px;
  background: #06b6d4;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.auth-container {
  display: flex;
  width: 920px;
  max-width: 95vw;
  min-height: 580px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

/* 左侧品牌区 */
.auth-brand {
  width: 380px;
  background: linear-gradient(135deg, rgba(0,82,217,0.6) 0%, rgba(25,61,184,0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  top: -100px;
  right: -100px;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  bottom: -80px;
  left: -40px;
}

.brand-content { text-align: center; position: relative; z-index: 1; }

.brand-icon-large {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.brand-content h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.brand-content p {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
}

/* 右侧表单区 */
.auth-form-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-form-card {
  width: 100%;
  max-width: 380px;
}

.auth-header { margin-bottom: 32px; text-align: center; }
.auth-header h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-header p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}

.auth-form .form-label { color: rgba(255,255,255,0.7); }

.auth-form .form-input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}
.auth-form .form-input:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,82,217,0.2);
}
.auth-form .form-input::placeholder { color: rgba(255,255,255,0.35); }

.auth-form .input-icon { color: rgba(255,255,255,0.4); }
.auth-form .toggle-pwd { color: rgba(255,255,255,0.4); }
.auth-form .toggle-pwd:hover { color: rgba(255,255,255,0.7); }

.auth-form .captcha-img { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.auth-form .captcha-img:hover { border-color: var(--primary); }

.auth-footer {
  margin-top: 24px;
  text-align: center;
}
.auth-footer p { color: rgba(255,255,255,0.5); font-size: 13px; }
.auth-footer a { color: var(--primary); font-weight: 500; }
.auth-footer a:hover { color: #66a3ff; }

.sms-btn {
  padding: 6px 12px !important;
  font-size: 12px !important;
  min-width: 90px;
  white-space: nowrap;
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: rgba(255,255,255,0.8) !important;
}
.sms-btn:hover { background: rgba(255,255,255,0.15) !important; color: #fff !important; }

/* ===== Landing Page (Hero) ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  height: 64px;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-links { display: flex; gap: 12px; align-items: center; }

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f3ff 100%);
  padding-top: 64px;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 80px 24px;
}

.hero-content { flex: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 16px; }

.hero-visual { flex: 1; display: flex; justify-content: center; }

.hero-card {
  width: 340px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(800px) rotateY(-5deg) rotateX(3deg);
  transition: transform 0.3s;
}
.hero-card:hover { transform: perspective(800px) rotateY(-2deg) rotateX(1deg); }

.hero-card-header {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: #f8f9fd;
  border-bottom: 1px solid var(--border-color);
}
.hero-card-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #e34d59; }
.dot.yellow { background: #ff9f00; }
.dot.green { background: #00a870; }

.hero-card-body { padding: 30px 24px; }

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 200px;
  padding: 0 10px;
}

.mock-bar {
  flex: 1;
  background: var(--primary-gradient);
  border-radius: 4px 4px 0 0;
  min-height: 20px;
  opacity: 0.8;
  transition: height 0.5s;
}

/* Features Section */
.features {
  padding: 80px 0;
  background: #fff;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s;
  background: #fff;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: transparent;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
}
.feature-icon.blue { background: var(--primary-light); color: var(--primary); }
.feature-icon.purple { background: #f3f0ff; color: #7c3aed; }
.feature-icon.cyan { background: #e0f7fa; color: #0288d1; }

.feature-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* Footer */
.footer {
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-body);
}

/* ===== Dashboard ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.sidebar-brand .brand-text {
  color: #fff;
  font-size: 17px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: rgba(255,255,255,0.6);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s;
  text-decoration: none;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active {
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 500;
}
.nav-item.logout { color: rgba(255,255,255,0.4); margin-top: auto; }
.nav-item.logout:hover { color: var(--danger); background: rgba(227,77,89,0.1); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Main content area */
.main-content {
  margin-left: 240px;
  min-height: 100vh;
  background: var(--bg-body);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
}

.topbar-left h2 { font-size: 20px; font-weight: 600; color: var(--text-primary); }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

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

.content-body { padding: 32px; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: #e3f5ee; color: var(--success); }
.stat-icon.orange { background: #fff3e0; color: var(--warning); }
.stat-icon.purple { background: #f3f0ff; color: #7c3aed; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Welcome Card */
.welcome-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 40px;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  color: #fff;
}

.welcome-content h3 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.welcome-content p { opacity: 0.85; font-size: 14px; margin-bottom: 20px; }
.welcome-content .btn-primary {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
  box-shadow: none;
}
.welcome-content .btn-primary:hover {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

.welcome-illustration { font-size: 72px; opacity: 0.3; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 9999;
}
.toast.toast-show { transform: translateX(0); }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .auth-container { flex-direction: column; width: 480px; }
  .auth-brand { width: 100%; padding: 32px; min-height: 160px; }
  .brand-icon-large { width: 56px; height: 56px; font-size: 26px; margin-bottom: 12px; }
  .brand-content h1 { font-size: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero .container { flex-direction: column; padding: 40px 24px; }
  .hero-title { font-size: 32px; }
  .hero-actions { flex-direction: column; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .sidebar { width: 60px; }
  .sidebar .brand-text,
  .sidebar .nav-item span { display: none; }
  .main-content { margin-left: 60px; }
  .stats-grid { grid-template-columns: 1fr; }
  .content-body { padding: 16px; }
  .welcome-card { flex-direction: column; text-align: center; }
  .welcome-illustration { display: none; }
}

@media (max-width: 520px) {
  .auth-container { border-radius: 0; max-width: 100vw; min-height: 100vh; }
  .auth-form-wrapper { padding: 24px; }
}
