﻿:root {
  --bg: #f7efe1;
  --bg-2: #f3e0c2;
  --ink: #1d2b2d;
  --muted: #5c6f73;
  --card: #fff8ed;
  --accent: #e6722b;
  --accent-2: #1c7b73;
  --accent-3: #f7b733;
  --danger: #c94b3a;
  --shadow: rgba(27, 33, 29, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

.ambient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(247, 183, 51, 0.25), transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(28, 123, 115, 0.18), transparent 40%),
    radial-gradient(circle at 20% 90%, rgba(230, 114, 43, 0.18), transparent 45%),
    linear-gradient(135deg, #fdf6ea 0%, #f3e0c2 100%);
  z-index: -1;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: rise 0.6s ease;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.8), rgba(255, 252, 247, 0.8));
  border-radius: 24px;
  padding: 28px 32px;
  box-shadow: 0 18px 40px var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(230, 114, 43, 0.25), transparent 70%);
  border-radius: 50%;
}

.hero-text h1 {
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 36px;
  margin: 6px 0 8px;
}

.tag {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(28, 123, 115, 0.15);
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
}

.sub {
  color: var(--muted);
  margin: 0;
}

.stats-panel {
  display: flex;
  gap: 16px;
}

.stat {
  min-width: 130px;
  padding: 14px 18px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(28, 123, 115, 0.12);
}

.stat .label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat .value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
  display: block;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

.panel,
.hall {
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 32px var(--shadow);
}

.announcement {
  border: 1px dashed rgba(28, 123, 115, 0.35);
  background: linear-gradient(135deg, rgba(247, 183, 51, 0.08), rgba(28, 123, 115, 0.08));
}

.announcement-text {
  font-size: 15px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 20px;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
}

.publish-form {
  display: grid;
  gap: 16px;
}


label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(29, 43, 45, 0.15);
  font-size: 15px;
  background: #fffdf9;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(28, 123, 115, 0.12);
}

.btn {
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(28, 123, 115, 0.18);
}

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

.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #2b160a;
}

.ghost {
  background: rgba(28, 123, 115, 0.12);
  color: var(--accent-2);
}

.danger {
  background: rgba(201, 75, 58, 0.15);
  color: var(--danger);
}

.items {
  display: grid;
  gap: 16px;
}

.item {
  padding: 18px 20px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(27, 33, 29, 0.08);
  border: 1px solid rgba(29, 43, 45, 0.08);
  animation: fadeIn 0.4s ease;
}

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.price {
  font-weight: 700;
  color: var(--accent-2);
}

.time {
  font-size: 13px;
  color: var(--muted);
}

.code {
  margin: 12px 0;
  padding: 12px;
  background: rgba(247, 183, 51, 0.12);
  border-radius: 12px;
  font-family: "JetBrains Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.item-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hall-actions {
  justify-content: flex-end;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(28, 123, 115, 0.08);
  border-radius: 16px;
}

.foot {
  text-align: right;
}

.admin-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(29, 43, 45, 0.9);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

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

.toast.error {
  background: rgba(201, 75, 58, 0.9);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 43, 45, 0.45);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  background: #fffdf7;
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(29, 43, 45, 0.2);
  max-width: 420px;
  width: calc(100% - 32px);
  z-index: 1;
}

.modal-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.modal-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.admin-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-controls input {
  min-width: 220px;
}

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

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

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-panel {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 20px 16px 40px;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    flex-direction: column;
    gap: 8px;
    width: auto;
  }

  .hero {
    padding: 18px 16px 16px;
  }

  .hero-text {
    padding-right: 120px;
  }

  .tag {
    font-size: 12px;
    padding: 4px 10px;
  }

  .hero-text h1 {
    font-size: 28px;
  }

  .sub {
    font-size: 13px;
  }

  .stat {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .stat .label {
    font-size: 11px;
  }

  .stat .value {
    font-size: 14px;
    margin-top: 2px;
  }

  .hall-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
