:root {
  --bg: #0b0d12;
  --bg-2: #12151c;
  --bg-3: #1a1e27;
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.075);
  --card-solid: #161920;
  --text: #f2f4f8;
  --text-2: #b7c0ce;
  --text-3: #768094;
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --accent-glow: rgba(110, 231, 255, 0.35);
  --danger: #ff6b6b;
  --success: #4ade80;
  --warning: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 30px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(110, 231, 255, 0.25);
  color: #fff;
}

#app {
  min-height: 100vh;
}

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

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

input, textarea {
  font-family: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Background */
.page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(110, 231, 255, 0.10) 0%, transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(167, 139, 250, 0.09) 0%, transparent 32%),
    radial-gradient(circle at 50% 50%, rgba(110, 231, 255, 0.03) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
  z-index: -2;
  pointer-events: none;
}

.page::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.022'%3E%3Cpath d='M48 46v-6h-4v6h-6v4h6v6h4v-6h6v-4h-6zm0-40V0h-4v6h-6v4h6v6h4V10h6V6h-6zM8 46v-6H4v6H0v4h4v6h4v-6h4v-4H8zM8 6V0H4v6H0v4h4v6h4V10h4V6H8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.7;
  z-index: -1;
  pointer-events: none;
}

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

.container-sm {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  padding: 14px 0;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(140%);
  background: rgba(11, 13, 18, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.85;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(110, 231, 255, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-item {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-3);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--accent);
  background: rgba(110, 231, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  font-size: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-icon.has-key {
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.3);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.15);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #0a0c10;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(110, 231, 255, 0.14) 0%, transparent 65%);
  z-index: -1;
  pointer-events: none;
  filter: blur(40px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(110, 231, 255, 0.09);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 22px;
  border: 1px solid rgba(110, 231, 255, 0.18);
  box-shadow: 0 4px 20px rgba(110, 231, 255, 0.1);
  backdrop-filter: blur(6px);
}

.hero h1 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--text) 0%, var(--accent) 50%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 30px rgba(110, 231, 255, 0.18));
}

.hero p {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 12px;
  line-height: 1.8;
}

.curator {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 28px;
  letter-spacing: 0.08em;
}

.search-box {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 18px 24px 18px 54px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.02rem;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

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

.search-box input:focus {
  border-color: rgba(110, 231, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 5px rgba(110, 231, 255, 0.08), 0 18px 50px rgba(0, 0, 0, 0.25);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  font-size: 1.1rem;
}

/* Filters */
.filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 28px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.filter-chip.active {
  background: rgba(110, 231, 255, 0.13);
  color: var(--accent);
  border-color: rgba(110, 231, 255, 0.35);
  box-shadow: 0 4px 16px rgba(110, 231, 255, 0.12);
}

/* Stats */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 16px 0 36px;
  color: var(--text-3);
  font-size: 0.88rem;
}

.stat {
  text-align: center;
}

.stat strong {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  font-family: "Noto Serif SC", serif;
}

/* Section titles */
.section-title {
  font-family: "Noto Serif SC", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 36px 0 20px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  padding-bottom: 52px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  animation: fadeInUp 0.5s ease both;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(110, 231, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow), 0 0 0 1px rgba(110, 231, 255, 0.15);
  border-color: rgba(110, 231, 255, 0.3);
  background: var(--card-hover);
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(110, 231, 255, 0.09);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.card h3 {
  font-family: "Noto Serif SC", serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.4;
}

.card p {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modal / detail */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  background: var(--card-solid);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 101;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-family: "Noto Serif SC", serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.25;
}

.modal-meta {
  color: var(--text-3);
  font-size: 0.85rem;
}

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.1rem;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  color: var(--accent);
}

.section-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.section-label.base {
  color: var(--accent-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.reveal-toggle {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reveal-toggle:hover {
  background: rgba(167, 139, 250, 0.2);
}

.section-label.ai {
  color: var(--warning);
}

.section-label.base::before,
.section-label.ai::before {
  background: currentColor;
}

.text-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  line-height: 1.6;
  color: var(--text-2);
  font-size: 0.95rem;
  white-space: pre-wrap;
  margin-bottom: 16px;
}

.text-block:last-child {
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: nowrap;
}

.modal-actions .btn {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.btn {
  flex: 1;
  min-width: 120px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0c10;
  box-shadow: 0 8px 22px rgba(110, 231, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(110, 231, 255, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-danger {
  background: rgba(255, 107, 107, 0.1);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.25);
}

.btn-danger:hover {
  background: rgba(255, 107, 107, 0.18);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* AI 问答区（单人模式） */
.ai-area {
  margin-top: 8px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.04), rgba(251, 191, 36, 0.01));
  padding: 18px;
  margin-bottom: 22px;
}

.ai-hint {
  font-size: 0.82rem;
  color: var(--text-3);
  margin: 0 0 14px;
  line-height: 1.6;
}

.ai-hint .warn {
  color: var(--warning);
}

.ai-history {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding-right: 4px;
}

.ai-turn {
  margin-bottom: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-turn:last-child {
  margin-bottom: 0;
}

.ai-q {
  font-size: 0.88rem;
  color: var(--text-2);
  margin-bottom: 6px;
}

.ai-q::before {
  content: "问 ";
  color: var(--text-3);
  font-size: 0.78rem;
}

.ai-a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.ai-a::before {
  content: "答 ";
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 400;
}

.ai-a.yes { color: var(--success); }
.ai-a.no { color: var(--danger); }
.ai-a.irrelevant { color: var(--text-3); }
.ai-a.win { color: var(--warning); }

.ai-input-row {
  display: flex;
  gap: 10px;
}

.ai-input-row input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.ai-input-row input:focus {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.ai-input-row input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-input-row button {
  flex-shrink: 0;
  padding: 0 20px;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, var(--warning), #f59e0b);
  color: #1a1206;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ai-input-row button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.25);
}

.ai-input-row button:disabled {
  opacity: 0.5;
}

.ai-empty {
  text-align: center;
  color: var(--text-3);
  font-size: 0.85rem;
  padding: 20px 0;
}

/* ========== 汤详情页（全屏） ========== */
.soup-detail-page {
  min-height: 100vh;
  padding-bottom: 60px;
}

.soup-container {
  max-width: 820px;
  padding-top: 8px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 16px 0 20px;
  padding: 8px 16px;
  min-width: auto;
  flex: 0 0 auto;
  font-size: 0.88rem;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: translateX(-2px);
}

.soup-detail-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.soup-detail-header .card-tag {
  margin-bottom: 12px;
}

.soup-detail-title {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.soup-detail-page .text-block {
  font-size: 1rem;
  line-height: 1.85;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.soup-detail-page .section-label {
  margin-top: 28px;
  font-size: 0.82rem;
}

.soup-detail-page .ai-area {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-top: 8px;
}

.soup-detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.soup-detail-actions .btn {
  flex: 1;
  min-width: 160px;
}

/* 表单 / 输入 */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.84rem;
  color: var(--text-2);
  margin-bottom: 8px;
  font-weight: 500;
}

.input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.98rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

.input:focus {
  border-color: rgba(110, 231, 255, 0.5);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.08), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.input.mono {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.88rem;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row .input {
  flex: 1;
}

.input-row .btn-code {
  flex-shrink: 0;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.input-row .btn-code:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.input-row .btn-code:disabled {
  opacity: 0.5;
}

.form-card {
  max-width: 460px;
  margin: 56px auto;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 36px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  position: relative;
  animation: fadeInUp 0.5s ease both;
}

.form-card .logo-icon {
  margin: 0 auto 18px;
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
  border-radius: 16px;
}

.form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: var(--radius) var(--radius) 0 0;
}

.form-card h2 {
  font-family: "Noto Serif SC", serif;
  margin: 0 0 6px;
  text-align: center;
  font-size: 1.7rem;
}

.form-card .sub {
  color: var(--text-2);
  text-align: center;
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.form-error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.form-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: var(--success);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.form-foot {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-3);
}

.form-foot a {
  color: var(--accent);
}

.form-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 26px;
}

.form-tab {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  color: var(--text-3);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.form-tab.active {
  background: rgba(110, 231, 255, 0.14);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* 设置弹窗 */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 0.92rem;
  color: var(--text-2);
}

.settings-status {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.settings-status.ok {
  color: var(--success);
  background: rgba(74, 222, 128, 0.1);
}

.settings-status.no {
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.05);
}

.warning-box {
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: var(--warning);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.warning-box strong {
  display: block;
  margin-bottom: 4px;
}

/* 房间页 */
.room-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  padding: 28px 0 52px;
}

.chat-panel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  min-height: 520px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.chat-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.chat-title {
  font-family: "SF Mono", monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.chat-code {
  color: var(--text-3);
  font-size: 0.8rem;
  margin-top: 4px;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

.msg {
  margin-bottom: 14px;
  max-width: 86%;
  animation: fadeInUp 0.35s ease both;
}

.msg .meta {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 5px;
  padding: 0 6px;
}

.msg .bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.93rem;
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.06);
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.msg.mine {
  margin-left: auto;
  text-align: right;
}

.msg.mine .bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0c10;
  border: none;
  box-shadow: 0 6px 18px rgba(110, 231, 255, 0.18);
}

.msg.system {
  max-width: 100%;
  text-align: center;
}

.msg.system .bubble {
  background: transparent;
  color: var(--text-3);
  font-size: 0.8rem;
  font-style: italic;
  border: none;
}

.msg.ai_question .bubble {
  background: rgba(251, 191, 36, 0.09);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: var(--warning);
}

.msg.ai_answer .bubble {
  background: rgba(110, 231, 255, 0.09);
  border: 1px solid rgba(110, 231, 255, 0.2);
  color: var(--accent);
  font-weight: 600;
}

.chat-input {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.94rem;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input input:focus {
  border-color: rgba(110, 231, 255, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.chat-input .btn {
  min-width: auto;
  flex: 0 0 auto;
  padding: 0 16px;
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-weight: 600;
}

.chat-ended-notice {
  padding: 10px 18px;
  text-align: center;
  color: var(--warning);
  font-size: 0.85rem;
  background: rgba(251, 191, 36, 0.08);
  border-top: 1px solid rgba(251, 191, 36, 0.12);
}

.room-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.side-card h4 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--text-2);
  font-weight: 600;
}

.soup-mini {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.soup-mini .t {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 1rem;
}

.soup-mini .s {
  color: var(--text-3);
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.soup-mini .surface {
  color: var(--text-2);
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.no-soup {
  color: var(--text-3);
  font-size: 0.86rem;
  text-align: center;
  padding: 24px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.select-soup-btn {
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.86rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.select-soup-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* 房间大厅 */
.room-hall {
  padding: 36px 0 52px;
}

.hall-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}

.hall-head h2 {
  font-family: "Noto Serif SC", serif;
  margin: 0;
  font-size: 1.7rem;
}

.join-box {
  display: flex;
  gap: 10px;
  max-width: 340px;
}

.join-box input {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.94rem;
  outline: none;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.join-box input:focus {
  border-color: rgba(110, 231, 255, 0.45);
}

.room-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  backdrop-filter: blur(14px);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.room-card:hover {
  border-color: rgba(110, 231, 255, 0.28);
  transform: translateX(4px);
}

.room-card .code {
  font-family: "SF Mono", monospace;
  color: var(--accent);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 4px;
}

.room-card .info {
  flex: 1;
  color: var(--text-3);
  font-size: 0.85rem;
}

/* 汤选择器（房间内选汤） */
.soup-picker {
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 4px;
}

.soup-pick-item {
  padding: 14px 16px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  margin-bottom: 6px;
}

.soup-pick-item:hover {
  background: rgba(110, 231, 255, 0.08);
  border-color: rgba(110, 231, 255, 0.15);
}

.soup-pick-item .t {
  font-weight: 600;
  font-size: 0.94rem;
  margin-bottom: 3px;
}

.soup-pick-item .s {
  color: var(--text-3);
  font-size: 0.78rem;
}

/* Empty / loading */
.empty {
  text-align: center;
  padding: 90px 20px;
  color: var(--text-3);
}

.empty-icon {
  font-size: 3.2rem;
  margin-bottom: 18px;
  opacity: 0.7;
}

.empty h3 {
  color: var(--text-2);
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.empty p {
  margin: 0;
  line-height: 1.7;
  max-width: 320px;
  margin-inline: auto;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  margin: 0 auto 18px;
}

.spinner.sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
  display: inline-block;
  vertical-align: middle;
  margin: 0;
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:nth-child(1) { animation-delay: 0ms; }
.card:nth-child(2) { animation-delay: 60ms; }
.card:nth-child(3) { animation-delay: 120ms; }
.card:nth-child(4) { animation-delay: 180ms; }
.card:nth-child(5) { animation-delay: 240ms; }
.card:nth-child(6) { animation-delay: 300ms; }

.footer {
  text-align: center;
  padding: 20px 20px 40px;
  color: var(--text-3);
  font-size: 0.78rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 20px;
}

.footer a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 注册关闭提示 */
.register-notice {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.18);
  text-align: center;
}
.register-notice p {
  margin: 4px 0;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.5;
}
.register-notice p:first-child {
  color: var(--warning);
  font-weight: 600;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: var(--card-solid);
  color: var(--text);
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  z-index: 200;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, visibility 0s linear 0.2s;
  font-size: 0.9rem;
  max-width: 90vw;
  display: flex;
  align-items: center;
  gap: 8px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.toast.err {
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffd6d6;
}

.toast.ok {
  border-color: rgba(74, 222, 128, 0.35);
  color: #dcfce7;
}

/* 个人中心 */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 28px 0 52px;
  animation: fadeInUp 0.45s ease both;
}

.profile-header {
  padding: 40px 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-header .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #0a0c10;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(110, 231, 255, 0.22);
}

.profile-header .info h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-family: "Noto Serif SC", serif;
}

.profile-header .info p {
  margin: 0;
  color: var(--text-3);
  font-size: 0.9rem;
}

.profile-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.profile-card h3 {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-family: "Noto Serif SC", serif;
}

.profile-stat {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.profile-stat:last-child { border-bottom: none; }
.profile-stat .v { color: var(--accent); font-weight: 600; }

/* Focus visible */
:focus-visible {
  outline: 2px solid rgba(110, 231, 255, 0.5);
  outline-offset: 2px;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mobile nav toggle */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  place-items: center;
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 20px;
  right: 20px;
  background: rgba(16, 19, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px;
  z-index: 60;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  animation: fadeInUp 0.2s ease both;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(110, 231, 255, 0.1);
  color: var(--accent);
}

/* Mobile */
@media (max-width: 860px) {
  .room-layout {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    height: 62vh;
    min-height: 420px;
  }

  .room-side {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .room-side .side-card {
    flex: 1 1 260px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 36px 0 28px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero::before {
    width: 280px;
    height: 280px;
  }

  .card {
    padding: 18px;
  }

  .modal {
    width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: var(--radius) var(--radius) 0 0;
    left: 0;
    top: auto;
    bottom: 0;
    transform: translateY(100%) scale(1);
    opacity: 1;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .modal.open {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .modal-header {
    padding: 16px 20px 12px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .modal-body {
    padding: 16px 20px;
  }

  .modal-actions {
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .modal-actions .btn {
    padding: 10px 12px;
    font-size: 0.85rem;
    min-width: 0;
  }

  .stats-bar {
    gap: 24px;
  }

  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: grid;
  }

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

  .form-card {
    margin: 28px 12px;
    padding: 28px 22px;
  }

  .room-side {
    flex-direction: column;
  }

  .hall-head {
    flex-direction: column;
    align-items: stretch;
  }

  .join-box {
    max-width: none;
  }
}

/* ========== Admin ========== */
.admin-layout {
  display: flex;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 40px;
  min-height: calc(100vh - 80px);
}

.admin-sidebar {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

.admin-nav-item {
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.admin-nav-item.active {
  background: rgba(110, 231, 255, 0.12);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

.admin-main {
  flex: 1;
  min-width: 0;
}

.admin-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.admin-section {
  margin-bottom: 28px;
}

.admin-title {
  font-family: "Noto Serif SC", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 18px;
}

.admin-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-2);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 14px;
}

.admin-stat-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-stat-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.admin-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-stat-label {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 2px;
}

.admin-stat-sub {
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 2px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-3);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

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

.admin-table a {
  color: var(--accent);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag-success { background: rgba(74, 222, 128, 0.15); color: var(--success); }
.tag-danger { background: rgba(255, 107, 107, 0.15); color: var(--danger); }
.tag-info { background: rgba(110, 231, 255, 0.12); color: var(--accent); }
.tag-muted { background: rgba(118, 128, 148, 0.15); color: var(--text-3); }

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-toolbar-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-search {
  min-width: 200px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.admin-select {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.admin-btn-sm {
  padding: 8px 14px !important;
  font-size: 0.82rem !important;
}

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-act-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.admin-act-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.admin-act-btn.danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.2);
}

.admin-act-btn.danger:hover {
  background: rgba(255, 107, 107, 0.15);
}

.admin-row {
  display: flex;
  gap: 12px;
}

.admin-row .field {
  flex: 1;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
}

.admin-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-2);
}

.admin-hint {
  color: var(--text-3);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.admin-empty {
  color: var(--text-3);
  text-align: center;
  padding: 30px 0;
}

.admin-error {
  color: var(--danger);
  padding: 30px 0;
  text-align: center;
}

.admin-msg-content {
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}

.admin-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-page-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.admin-page-btn.active {
  background: rgba(110, 231, 255, 0.15);
  color: var(--accent);
  border-color: rgba(110, 231, 255, 0.3);
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
    gap: 0;
    padding-top: 12px;
  }

  .admin-sidebar {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    position: static;
    top: auto;
    gap: 4px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: none;
  }

  .admin-sidebar::-webkit-scrollbar { display: none; }

  .admin-nav-item {
    flex-shrink: 0;
    border-left: none !important;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .admin-nav-item.active {
    border-left: none !important;
    border-bottom: none;
    background: rgba(110, 231, 255, 0.15);
  }

  .admin-table {
    font-size: 0.75rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table::-webkit-scrollbar { display: none; }

  .admin-table thead,
  .admin-table tbody,
  .admin-table tr {
    display: table;
    table-layout: auto;
    width: max-content;
  }

  .admin-table th,
  .admin-table td {
    padding: 6px 8px;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar-right {
    flex-direction: column;
    gap: 8px;
  }

  .admin-search,
  .admin-select {
    min-width: 0;
    width: 100%;
  }

  .admin-btn-sm {
    width: 100%;
  }

  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .admin-stat-card {
    padding: 12px;
    gap: 10px;
  }

  .admin-stat-icon {
    font-size: 1.3rem;
  }

  .admin-stat-value {
    font-size: 1rem;
  }

  .admin-actions {
    gap: 4px;
  }

  .admin-act-btn {
    padding: 3px 6px;
    font-size: 0.7rem;
  }

  .admin-msg-content {
    max-width: 100px;
  }

  .admin-main {
    padding-bottom: 40px;
  }
}
