/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
  background: #F8FAFC;
  color: #1E293B;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: #2563EB; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ===== CSS Variables ===== */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --accent: #F59E0B;
  --accent-light: #FFFBEB;
  --success: #10B981;
  --success-dark: #059669;
  --success-light: #ECFDF5;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --dark: #0F172A;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 8px 32px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12), 0 16px 48px rgba(0,0,0,.10);
}

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

/* ===== Navbar ===== */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--gray-100);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.navbar-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.navbar-logo:hover { text-decoration: none; color: var(--primary); }
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.navbar-user {
  font-size: .875rem;
  color: var(--gray-500);
  margin-right: 4px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #1E3A5F 100%);
  color: #fff;
  padding: 80px 0 64px;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: .8rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,.75);
  max-width: 500px;
  margin: 0 auto 40px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.hero-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.hero-stat-label {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
}

/* ===== Section ===== */
.section { padding: 56px 0; }
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--gray-500);
  margin-bottom: 36px;
}

/* ===== File Grid & Cards ===== */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.file-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.file-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.file-card-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.file-card-cover-placeholder {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  flex-shrink: 0;
}
.file-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.file-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.file-card-desc {
  font-size: .85rem;
  color: var(--gray-500);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.file-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.file-card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.file-card-action {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 600;
}

/* ===== Gradients for placeholders ===== */
.grad-0 { background: linear-gradient(135deg, #667eea, #764ba2); }
.grad-1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.grad-2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.grad-3 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.grad-4 { background: linear-gradient(135deg, #fa709a, #fee140); }
.grad-5 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.grad-6 { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.grad-7 { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover { background: var(--success-dark); border-color: var(--success-dark); color: #fff; }
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-outline:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary-light); }
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-accent { background: var(--accent-light); color: #B45309; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-danger { background: var(--danger-light); color: var(--danger); }

/* ===== Alerts ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-light); color: var(--success-dark); border: 1px solid #A7F3D0; }
.alert-danger { background: var(--danger-light); color: #B91C1C; border: 1px solid #FCA5A5; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #BFDBFE; }
.alert-warning { background: var(--accent-light); color: #92400E; border: 1px solid #FDE68A; }

/* ===== Forms ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-control::placeholder { color: var(--gray-400); }
.form-hint { font-size: .8rem; color: var(--gray-400); margin-top: 4px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ===== Auth Layout ===== */
.auth-page {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 64px);
}
.auth-left {
  flex: 1;
  background: linear-gradient(135deg, var(--dark) 0%, #1E3A5F 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  color: #fff;
}
.auth-left h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.auth-left p { color: rgba(255,255,255,.7); font-size: 1.05rem; line-height: 1.7; }
.auth-feature-list {
  list-style: none;
  margin-top: 32px;
}
.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.auth-feature-list li:last-child { border-bottom: none; }
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--gray-50);
}
.auth-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
}
.auth-box h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.auth-box .auth-sub {
  color: var(--gray-500);
  font-size: .9rem;
  margin-bottom: 32px;
}
.auth-divider {
  text-align: center;
  position: relative;
  margin: 24px 0;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-200);
}
.auth-divider span {
  position: relative;
  background: #fff;
  padding: 0 12px;
  font-size: .8rem;
  color: var(--gray-400);
}
.auth-footer-link {
  text-align: center;
  font-size: .875rem;
  color: var(--gray-500);
  margin-top: 24px;
}

/* ===== File Detail Page ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--gray-500);
  padding: 16px 0;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--gray-300); }
.file-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
  padding: 24px 0 40px;
  max-width: 860px;
}
.file-detail-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 210px;
  background: var(--gray-100);
}
.file-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-detail-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}
.file-detail-info { }
.file-detail-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.3;
}
.file-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.file-detail-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin: 20px 0;
  display: block;
}
.file-detail-desc {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 12px;
  font-size: .88rem;
}
.file-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.file-detail-actions .btn { width: 100%; }
.payment-methods {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.payment-method-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: all .15s;
}
.payment-method-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.payment-method-btn:hover { border-color: var(--primary); }

/* ===== Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-cover { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-lg); }
.skeleton-title { height: 36px; width: 80%; margin-bottom: 12px; }
.skeleton-meta { height: 20px; width: 50%; margin-bottom: 20px; }
.skeleton-price { height: 56px; width: 120px; margin-bottom: 20px; }
.skeleton-desc { height: 80px; width: 100%; margin-bottom: 24px; }
.skeleton-btn { height: 48px; width: 100%; }

/* ===== Dashboard ===== */
.dashboard-header {
  background: linear-gradient(135deg, var(--dark) 0%, #1E3A5F 100%);
  color: #fff;
  padding: 48px 0 36px;
}
.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.dashboard-header p { color: rgba(255,255,255,.7); font-size: .95rem; }
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}
.stat-card-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}
.stat-card-label {
  font-size: .85rem;
  color: var(--gray-500);
  margin-top: 4px;
}
.purchase-grid { /* 已购文件网格，与首页保持一致 */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.purchase-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.purchase-card-cover {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.purchase-card-body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.purchase-card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.purchase-card-meta {
  font-size: .8rem;
  color: var(--gray-400);
  margin-bottom: 12px;
  flex: 1;
}
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--gray-400);
}
.empty-state-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.25rem; font-weight: 600; color: var(--gray-600); margin-bottom: 8px; }
.empty-state p { font-size: .9rem; }

/* ===== Admin ===== */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}
.admin-sidebar {
  width: 220px;
  background: var(--dark);
  color: #fff;
  padding: 24px 0;
  flex-shrink: 0;
}
.admin-sidebar-title {
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px 20px 4px;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  text-decoration: none;
  transition: all .15s;
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}
.admin-main { flex: 1; padding: 32px; overflow: auto; }
.admin-header { margin-bottom: 32px; }
.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.admin-header p { color: var(--gray-500); font-size: .9rem; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.admin-stat {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
}
.admin-stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}
.admin-stat-label { font-size: .8rem; color: var(--gray-500); }

/* ===== Table ===== */
.table-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 32px;
}
.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.table-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
thead {
  background: var(--gray-50);
}
th {
  text-align: left;
  padding: 12px 20px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
td {
  padding: 14px 20px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
.td-actions { display: flex; gap: 8px; align-items: center; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
}
.modal-title { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: all .15s;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-700); }
.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 0 28px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ===== Pay Page ===== */
.pay-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  padding: 24px;
}
.pay-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.pay-icon { font-size: 3rem; margin-bottom: 16px; }
.pay-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-bottom: 16px; }
.pay-amount { font-size: 3rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.pay-tip { color: var(--danger); font-size: .875rem; margin-bottom: 8px; }
.pay-desc { color: var(--gray-400); font-size: .8rem; margin-bottom: 24px; }
.pay-qr {
  width: 180px;
  height: 180px;
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
}
.pay-qr-inner { color: var(--gray-400); font-size: .875rem; }
.pay-actions { }

/* ===== Footer ===== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  padding: 40px 0 24px;
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { color: #fff; font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; display: block; }
.footer-desc { font-size: .85rem; line-height: 1.7; color: rgba(255,255,255,.5); }
.footer-links-title { color: #fff; font-weight: 600; font-size: .875rem; margin-bottom: 12px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,.5); font-size: .85rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
}

/* ===== Upload Area ===== */
.upload-area {
  display: block;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: var(--gray-50);
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-area input[type="file"] { display: none; }
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-text { font-size: .9rem; color: var(--gray-600); }
.upload-hint { font-size: .8rem; color: var(--gray-400); margin-top: 4px; }

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  background: var(--gray-900);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in .3s ease;
  max-width: 320px;
}
.toast.toast-success { background: var(--success); }
.toast.toast-danger { background: var(--danger); }
@keyframes toast-in {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .hero { padding: 56px 0 40px; }
  .hero-stats { gap: 24px; }
  .file-detail {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0 32px;
    max-width: 100%;
  }
  .auth-page { flex-direction: column; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px; }
  .auth-box { padding: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 12px 0; }
  .admin-main { padding: 20px 16px; }
  .payment-methods { flex-direction: column; }
  .hero-stats { flex-direction: column; gap: 16px; }
}
@media (max-width: 480px) {
  .navbar-logo span { display: none; }
  .file-grid { grid-template-columns: 1fr; }
  .purchase-grid { /* 已购文件网格，与首页保持一致 */ grid-template-columns: 1fr; }
}

/* 已购买角标 */
.file-card { position: relative; }
.purchased-badge-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #10B981;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(16,185,129,0.35);
}

/* ===== 用户中心已购文件网格 ===== */
.my-files-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 16px;
  margin-bottom: 40px;
}
.my-file-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  display: flex !important;
  flex-direction: column;
}
.my-file-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.13); }
.my-file-card-cover { width: 100%; height: 150px; object-fit: cover; display: block; }
.my-file-card-cover-placeholder {
  width: 100%; height: 150px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.my-file-badge-purchased {
  position: absolute; top: 8px; right: 8px;
  background: #16a34a; color: #fff;
  font-size: .7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
}
.my-file-card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.my-file-card-title { font-size: .9rem; font-weight: 600; color: #1e293b; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-file-card-meta { font-size: .75rem; color: #94a3b8; margin-bottom: 8px; flex: 1; }
@media (max-width: 600px) {
  .my-files-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
}
