:root {
  --primary: #c41e3a;
  --primary-dark: #9b1830;
  --primary-light: #e85a6b;
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-hover: #252525;
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --border: #333;
  --accent: #ffd700;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

.header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1518 100%);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.3);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-area img {
  height: 56px;
  width: auto;
  border-radius: 8px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav a {
  color: var(--text);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav a:hover,
.nav a.active {
  background: var(--primary);
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: #1a1a1a;
  border: 1px solid #555;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
  z-index: 1003;
}

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.section-title {
  font-size: 1.4rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 6px;
  height: 24px;
  background: var(--primary);
  border-radius: 3px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #fff;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary-light) !important;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff !important;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 0.9rem;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

tr:hover td {
  background: var(--bg-hover);
}

td.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

.notice {
  background: rgba(196, 30, 58, 0.1);
  border: 1px solid rgba(196, 30, 58, 0.4);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.notice strong {
  color: var(--primary-light);
}

.reg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.reg-card h3 {
  margin-bottom: 8px;
}

.reg-card .status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.status-pending {
  background: #3a3a1a;
  color: #ffc107;
}

.status-open {
  background: #1a3a1a;
  color: #28a745;
}

.status-closed {
  background: #3a1a1a;
  color: #e85a6b;
}

.footer {
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-note {
  background: #1a1a2e;
  border: 1px dashed #4a4a6a;
  border-radius: 10px;
  padding: 16px;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .nav {
    width: 100%;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .logo-text {
    font-size: 1rem;
  }
}

.sponsors-bar {
  max-width: 1100px;
  margin: 40px auto 20px;
  padding: 24px 20px;
  border-top: 1px solid #2a2a2a;
}
.sponsors-title {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}
.sponsors-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  align-items: center;
}
.sponsors-empty {
  color: #444;
  font-size: 0.8rem;
}
.sp-item {
  width: 100px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #151515;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 6px;
  text-decoration: none;
}
.sp-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sp-name {
  color: #aaa;
  font-size: 0.75rem;
  text-align: center;
}

/* 移动端导航：≤900px 折叠为下拉菜单（header 在此宽度下不再 sticky） */
@media (max-width: 900px) {
  .header, .header-inner { position: relative; }
  .header-inner { gap: 8px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 10050; }
  #mainNav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: #111; padding: 8px; z-index: 10040;
    border-bottom: 1px solid #333;
    box-shadow: 0 12px 24px rgba(0,0,0,.4);
  }
  #mainNav.open { display: flex; }
  #mainNav a { display: block; padding: 12px 14px; color: #eee; border-bottom: 1px solid #333; }
}
@media (min-width: 901px) {
  .nav { gap: 8px; }
}
