﻿:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --border: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --link: 217 91% 60%;
  --radius: 0.5rem;
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: hsl(var(--foreground));
  background-color: #f5f7fa;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 { margin: 0; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  background: hsla(0, 0%, 100%, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
  z-index: 100;
  height: var(--header-height);
}

.nav-wrap {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 0.25rem;
}

.nav a {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: all 0.15s ease;
}

.nav a:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.nav a.active {
  background: hsl(var(--accent));
  color: hsl(var(--primary));
  font-weight: 600;
}

/* ===== Page Layout ===== */
.page {
  padding: 1.5rem 0 2rem;
}

/* ===== Stats Cards Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.stat-card:hover {
  border-color: hsl(var(--link));
  box-shadow: 0 2px 8px rgba(0,102,255,0.08);
  transform: translateY(-1px);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue {
  background: #eef4ff;
  color: #3b82f6;
}

.stat-icon-green {
  background: #ecfdf5;
  color: #10b981;
}

.stat-icon-orange {
  background: #fef7ed;
  color: #f59e0b;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: hsl(var(--foreground));
}

.stat-label {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
}

/* ===== Row Split (Notice + Calendar) ===== */
.row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.split-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.split-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.split-card-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  background: #3b82f6;
  color: #fff;
  line-height: 1.4;
}

.badge-outline {
  background: transparent;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
}

/* -- Notice -- */
/* ===== Notice Items ===== */
.notice-list {
  min-height: 60px;
}

.notice-empty {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem 0;
}

.notice-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid hsl(var(--border));
}

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

.notice-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.2rem;
}

.notice-date {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  display: inline-block;
  margin-bottom: 0.2rem;
}

.notice-content {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

/* -- Calendar -- */
.calendar-month-header {
  text-align: center;
  margin-bottom: 0.6rem;
}

.calendar-month-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.25rem;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 2px;
  margin-bottom: 0.75rem;
}

.calendar-day {
  padding: 0.3rem 0;
  font-size: 0.8rem;
  border-radius: 6px;
  color: hsl(var(--foreground));
  transition: background 0.1s;
}

.calendar-day.today {
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
}

.calendar-day.other-month {
  color: #d1d5db;
}

.calendar-events {
  border-top: 1px solid hsl(var(--border));
  padding-top: 0.6rem;
}

.calendar-event {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
}

.event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
}

/* ===== Rank Section ===== */
.rank-section {
  margin-bottom: 1.25rem;
}

.rank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.rank-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ===== Tab Group ===== */
.tab-group {
  display: inline-flex;
  background: #f0f2f5;
  border-radius: 8px;
  padding: 2px;
}

.tab-btn {
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: hsl(var(--card));
  color: hsl(var(--primary));
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tab-btn:hover:not(.active) {
  color: hsl(var(--foreground));
}

/* ===== Panel (shared with other pages) ===== */
.panel {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.panel h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.sub {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}

/* ===== Summary ===== */
.summary {
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

/* ===== Table ===== */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
  padding: 0.7rem 0.5rem;
}

th {
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: transparent;
}

tr:last-child td {
  border-bottom: none;
}

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

.empty {
  text-align: center;
  color: hsl(var(--muted-foreground));
  padding: 1.5rem 0.5rem;
}

.table-link {
  color: hsl(var(--link));
}

.table-link:hover {
  text-decoration: underline;
}

/* ===== Quick Links ===== */
.quick-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.quick-link:hover {
  color: hsl(var(--link));
  border-color: hsl(var(--link));
  background: #eef4ff;
}

/* ===== Footer ===== */
.footer {
  padding: 1rem 1.5rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
}

/* ===== Controls (shared with other pages) ===== */
.controls-home, .controls-basic {
  display: flex;
  gap: 0.7rem;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.grow {
  flex: 1;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

input[type="search"],
input[type="text"] {
  height: 2.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0 0.85rem;
  font-size: 0.9rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input::placeholder {
  color: hsl(var(--muted-foreground));
  opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .row-split {
    grid-template-columns: 1fr;
  }

  .rank-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 0.6rem 0;
  }

  .nav a {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
  }

  .quick-links {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-link {
    justify-content: center;
  }

  .controls-home, .controls-basic {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-card {
    padding: 1rem;
  }
}
.notice-link {
  color: hsl(var(--link));
  text-decoration: none;
}

.notice-link:hover {
  text-decoration: underline;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1rem 0 0.8rem;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  background: hsl(var(--card));
  z-index: 10;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: all 0.12s ease;
}

.page-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.page-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
/* ===== Player Profile ===== */
.profile-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
}
.profile-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
}
.profile-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
}
.profile-value {
  font-size: 0.9rem;
  font-family: monospace;
}