/* ListsShare - 新拟态 (Neumorphism) 设计 */

:root {
  /* 新拟态配色 - 更丰富 */
  --bg-primary: #e0e5ec;
  --bg-secondary: #e0e5ec;
  --bg-card: #e0e5ec;
  --bg-hover: #d1d9e6;
  --text-primary: #2d3436;
  --text-secondary: #636e72;

  /* 多彩主题色 */
  --accent: #6366f1;
  /* 紫蓝色 */
  --accent-secondary: #8b5cf6;
  /* 紫色 */
  --accent-tertiary: #06b6d4;
  /* 青色 */
  --accent-light: rgba(99, 102, 241, 0.15);
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --gold: #eab308;
  --silver: #94a3b8;
  --bronze: #d97706;

  /* 新拟态阴影 */
  --shadow-out: 8px 8px 16px #c8ced8, -8px -8px 16px #ffffff;
  --shadow-out-sm: 4px 4px 8px #c8ced8, -4px -4px 8px #ffffff;
  --shadow-in: inset 4px 4px 8px #c8ced8, inset -4px -4px 8px #ffffff;
  --shadow-in-sm: inset 2px 2px 4px #c8ced8, inset -2px -2px 4px #ffffff;

  --radius: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
}

/* Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header - 新拟态凸起效果 */
.header {
  background: var(--bg-secondary);
  padding: 16px 0;
  box-shadow: var(--shadow-out-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--accent);
  box-shadow: var(--shadow-in-sm);
}

/* Hero - 渐变标题 */
.hero {
  text-align: center;
  padding: 40px 0 30px;
}

.hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Stats - 新拟态卡片 */
.stats-grid {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  justify-content: center;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  text-align: center;
  min-width: 110px;
  box-shadow: var(--shadow-out);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

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

/* Tabs - 新拟态风格 */
.tabs {
  display: inline-flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-in);
}

.tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-out-sm);
}

/* Search - 新拟态输入框 */
.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 12px 18px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow-in);
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  box-shadow: var(--shadow-in), 0 0 0 2px var(--accent);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

/* Ranking Table - 新拟态 */
.ranking-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-out);
}

.ranking-header {
  display: grid;
  grid-template-columns: 55px 1fr 75px;
  padding: 14px 20px;
  background: var(--bg-hover);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.ranking-item {
  display: grid;
  grid-template-columns: 55px 1fr 75px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  align-items: center;
  transition: all 0.15s;
}

.ranking-item:hover {
  background: var(--bg-hover);
}

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

.rank {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-secondary);
}

.rank-1 {
  color: #f1c40f;
}

.rank-2 {
  color: #95a5a6;
}

.rank-3 {
  color: #e67e22;
}

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

.user-id {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #b91c1c;
  /* 深砖红色 */
  /* 深紫蓝色，更显眼 */
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-card);
  color: var(--accent);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-out-sm);
}

.votes {
  text-align: right;
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
}

.votes span {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 12px;
}

/* Buttons - 新拟态 */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  box-shadow: var(--shadow-out-sm);
}

.btn:active {
  box-shadow: var(--shadow-in-sm);
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #5558e3;
}

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

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

/* Upload - 新拟态 */
.upload-area {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-in);
}

.upload-area:hover,
.upload-area.dragover {
  box-shadow: var(--shadow-in), 0 0 0 2px var(--accent);
}

.upload-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.upload-area h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.upload-area p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Form - 新拟态 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow-in);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  box-shadow: var(--shadow-in), 0 0 0 2px var(--accent);
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 13px;
}

/* Card - 新拟态 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-out);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* Checkbox - 新拟态 */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

/* Loading */
.loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-hover);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* Toast - 新拟态 */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s;
  font-size: 14px;
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

/* Pagination - 新拟态 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.page-btn {
  padding: 10px 16px;
  background: var(--bg-card);
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  box-shadow: var(--shadow-out-sm);
}

.page-btn:hover,
.page-btn.active {
  color: var(--accent);
  box-shadow: var(--shadow-in-sm);
}

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

/* Footer */
.footer {
  text-align: center;
  padding: 30px 0;
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 48px;
}

/* Preview List */
.preview-list {
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-in);
}

.preview-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 13px;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Admin */
.admin-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

.admin-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-out);
}

.admin-menu-item {
  display: block;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 4px;
  transition: all 0.15s;
}

.admin-menu-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.admin-menu-item.active {
  box-shadow: var(--shadow-in-sm);
  color: var(--accent);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-out);
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
  }

  .stats-grid {
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1;
    min-width: 90px;
  }

  .ranking-header,
  .ranking-item {
    grid-template-columns: 45px 1fr 65px;
    padding: 12px 16px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .upload-area {
    padding: 36px 20px;
  }
}