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

:root {
  --primary: #4f7cff;
  --primary-dark: #3a63d8;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

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

.header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field .required {
  color: var(--danger);
  margin-left: 2px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

.field .hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-primary:disabled {
  background: #c7d2fe;
  cursor: not-allowed;
}

.btn-ghost {
  background: #eef2ff;
  color: var(--primary);
}

.btn-ghost:hover {
  background: #e0e7ff;
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: #f9fafb;
}

.result-box {
  margin-top: 18px;
  padding: 16px;
  background: #f0f5ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
}

.result-box .label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.result-box .link {
  display: block;
  font-size: 14px;
  word-break: break-all;
  color: var(--primary-dark);
  margin-bottom: 10px;
  user-select: all;
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.countdown.warning {
  color: var(--warning);
}

.countdown.danger {
  color: var(--danger);
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(31, 41, 55, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
}

/* 分享落地页 */
.top-bar {
  position: sticky;
  top: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  text-align: center;
  z-index: 10;
}

.top-bar .countdown {
  font-size: 14px;
}

.info-list {
  margin-top: 20px;
}

.info-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.info-item .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.info-item .value {
  font-size: 15px;
  color: var(--text);
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.info-item .value .copy-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  background: #eef2ff;
  color: var(--primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.info-item .value .copy-btn:hover {
  background: #e0e7ff;
}

.info-item .empty {
  color: #cbd5e1;
  font-style: italic;
}

.expired-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.expired-page h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.expired-page p {
  color: var(--muted);
  font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .container {
    padding: 16px 12px 60px;
  }
  .header h1 {
    font-size: 20px;
  }
  .card {
    padding: 16px;
  }
}
