:root {
  --bg: #0a0e17;
  --card: #121a2b;
  --card-border: #1e2a42;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(ellipse at top, #152238 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

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

.logo-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
  margin-bottom: 16px;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--muted);
  margin-top: 6px;
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.9rem;
}

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

.meta-label {
  color: var(--muted);
}

.meta-value {
  font-weight: 600;
  text-align: right;
}

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, opacity 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: white;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
  margin-bottom: 12px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #4f46e5);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #1e293b;
  color: var(--text);
  border: 1px solid var(--card-border);
  margin-top: 10px;
}

.notes {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: pre-wrap;
  margin-top: 8px;
}

.hint {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.85rem;
  margin-top: 16px;
}

.hint strong {
  color: #fde68a;
}

.qr-wrap {
  text-align: center;
  padding: 8px 0;
}

.qr-card {
  margin-top: 16px;
}

.qr-wrap img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: white;
  padding: 8px;
}

.qr-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
}

.qr-url {
  color: var(--accent);
  font-size: 0.78rem;
  margin-top: 8px;
  word-break: break-all;
}

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

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 24px;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Admin */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-header h1 {
  font-size: 1.35rem;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.badge.inactive {
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
}

.form-group textarea {
  min-height: 90px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.file-input {
  border: 2px dashed var(--card-border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
}

.file-input:hover,
.file-input.dragover {
  border-color: var(--accent);
}

.file-input input {
  display: none;
}

.file-name {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--success);
}

.message {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: none;
}

.message.show {
  display: block;
}

.message.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.message.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.release-list {
  list-style: none;
}

.release-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.88rem;
}

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

.release-item button {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.progress {
  height: 6px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
  display: none;
}

.progress.show {
  display: block;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transition: width 0.15s;
}

.progress-label {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 8px;
  min-height: 1.2em;
  text-align: center;
}

@media (min-width: 520px) {
  .container {
    padding-top: 48px;
  }
}
