/* 炼油化验站技术岗竞聘评分系统 - 样式表 */
/* 化验室主题 + 液态玻璃效果 */

:root {
  --bg-primary: #0a1628;
  --bg-secondary: #0f2942;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-blur: blur(20px);
  --text-primary: #e8f4f8;
  --text-secondary: rgba(232, 244, 248, 0.7);
  --text-muted: rgba(232, 244, 248, 0.45);
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-teal: #14b8a6;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 动态背景 - 化验室分子气泡 */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(135deg, #0a1628 0%, #0f2942 40%, #0a1f33 70%, #0d2818 100%);
}

.bg-bubbles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.15), rgba(20, 184, 166, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.1);
  animation: float-up linear infinite;
}

@keyframes float-up {
  0% {
    transform: translateY(100vh) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-10vh) scale(1.2);
    opacity: 0;
  }
}

/* 液态玻璃卡片 */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 顶部导航 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--glass-bg-hover);
  border-color: var(--glass-border);
}

.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
}

/* 入口选择 */
.role-select {
  display: flex;
  gap: 24px;
  justify-content: center;
  padding: 60px 20px;
}

.role-card {
  flex: 1;
  max-width: 360px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.role-card:hover {
  transform: translateY(-4px);
  background: var(--glass-bg-hover);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.15);
}

.role-card-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.role-card-icon.judge {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(20, 184, 166, 0.1));
  border: 2px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
}

.role-card-icon.admin {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.1));
  border: 2px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
}

.role-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.role-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 评委信息输入 */
.judge-input-section {
  padding: 40px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.input-group {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.input-field {
  flex: 1;
}

.input-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-control {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.input-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

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

/* 按钮 */
.btn {
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
  color: #fff;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.45);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

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

.btn-secondary:hover {
  background: var(--glass-bg-hover);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-red), #dc2626);
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* 候选人标签栏 */
.candidate-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 20px;
  margin-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) transparent;
}

.candidate-tabs::-webkit-scrollbar {
  height: 4px;
}

.candidate-tabs::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 2px;
}

.candidate-tab {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.candidate-tab:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.candidate-tab.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.candidate-tab .score-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
}

.candidate-tab .score-badge.completed {
  background: var(--accent-green);
  color: #fff;
}

/* 评分区域 */
.scoring-area {
  padding: 32px;
  min-height: 400px;
}

.candidate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.candidate-name {
  font-size: 1.6rem;
  font-weight: 700;
}

.candidate-total {
  display: flex;
  align-items: center;
  gap: 12px;
}

.total-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.total-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  min-width: 60px;
  text-align: right;
}

.total-max {
  font-size: 1rem;
  color: var(--text-muted);
}

/* 评分类别 */
.category-section {
  margin-bottom: 28px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.category-header .cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.category-header .cat-max {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
}

.category-header .cat-score {
  font-weight: 700;
  font-size: 1rem;
}

/* 评分项 */
.score-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.score-item:hover {
  background: rgba(0, 0, 0, 0.25);
  border-color: var(--glass-border);
}

.score-item-desc {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.score-item-max {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 滑块评分 */
.score-slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.score-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
  transition: var(--transition);
}

.score-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.score-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
}

.score-value-display {
  width: 50px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-cyan);
}

/* 进度条 */
.progress-bar-container {
  padding: 16px 20px;
  margin-bottom: 20px;
}

.progress-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.progress-bar-label {
  color: var(--text-secondary);
}

.progress-bar-value {
  font-weight: 700;
  color: var(--accent-cyan);
}

.progress-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-teal), var(--accent-green));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 底部操作栏 */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  margin-top: 20px;
  position: sticky;
  bottom: 20px;
  z-index: 10;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.toast.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.toast.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.toast.info {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #67e8f9;
}

@keyframes toast-in {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 管理员页面 */
.admin-login {
  max-width: 400px;
  margin: 80px auto;
  padding: 48px;
}

.admin-content {
  display: none;
}

.admin-content.visible {
  display: block;
}

/* 排名表 */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.ranking-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ranking-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

.ranking-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
.rank-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #000; }
.rank-3 { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }
.rank-other { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.score-bar {
  display: inline-block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-teal));
  vertical-align: middle;
  margin-right: 8px;
  min-width: 4px;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 24px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 图表容器 */
.chart-container {
  padding: 28px;
  margin-bottom: 24px;
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-bar-label {
  width: 80px;
  font-size: 0.9rem;
  text-align: right;
  color: var(--text-secondary);
}

.chart-bar-track {
  flex: 1;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar-score {
  width: 60px;
  font-weight: 700;
  color: var(--accent-cyan);
  font-size: 0.95rem;
}

/* 详细评分表 */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.detail-table th {
  padding: 10px 12px;
  text-align: center;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  font-weight: 600;
  white-space: nowrap;
}

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

.detail-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.detail-table .avg-row {
  background: rgba(6, 182, 212, 0.05);
  font-weight: 700;
}

.detail-table .avg-row td {
  border-top: 2px solid var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
}

/* Loading */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(6, 182, 212, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* 响应式 */
@media (max-width: 768px) {
  .container { padding: 12px; }
  .header { flex-direction: column; gap: 12px; }
  .role-select { flex-direction: column; padding: 24px 12px; }
  .scoring-area { padding: 20px; }
  .score-item { flex-direction: column; align-items: stretch; gap: 8px; }
  .score-slider-container { min-width: 100%; }
  .action-bar { flex-direction: column; gap: 12px; }
  .candidate-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .detail-table { font-size: 0.75rem; }
  .detail-table th, .detail-table td { padding: 6px 8px; }
}
