/* ===== TapReel — shared legal-page styles ===== */

:root {
  --color-primary: #1a1a2e;
  --color-accent: #e94560;
  --color-accent-hover: #d63851;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
  --color-success: #28a745;
  --color-error: #dc3545;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --max-width: 800px;
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stack);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ---------- header ---------- */

.site-header {
  background: var(--color-primary);
  color: #fff;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.logo span {
  color: var(--color-accent);
}

.header-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: #fff;
}

/* ---------- main content ---------- */

.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ---------- legal sections ---------- */

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.legal-section h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin: 1.25rem 0 0.5rem;
}

.legal-section p,
.legal-section li {
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-section a {
  color: var(--color-accent);
  text-decoration: none;
}

.legal-section a:hover {
  text-decoration: underline;
}

/* ---------- summary box (Chinese) ---------- */

.summary-box {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
}

.summary-box h2 {
  border-bottom: none;
  margin-bottom: 0.5rem;
}

/* ---------- data table ---------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
}

.data-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.data-table tr:nth-child(even) {
  background: var(--color-bg-alt);
}

/* ---------- landing page hero ---------- */

.hero {
  text-align: center;
  padding: 4rem 1.5rem;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.hero h1 span {
  color: var(--color-accent);
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
}

.link-card {
  display: block;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.2s, transform 0.2s;
}

.link-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.link-card h3 {
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.link-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ---------- account deletion form ---------- */

.delete-form-wrapper {
  max-width: 480px;
  margin: 0 auto;
}

.warning-box {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.warning-box strong {
  color: #856404;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.input-row {
  display: flex;
  gap: 0.75rem;
}

.form-group input[type="email"],
.form-group input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--color-accent);
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.btn-secondary {
  background: var(--color-primary);
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: #16213e;
}

.btn-danger {
  background: var(--color-error);
  color: #fff;
  width: 100%;
  padding: 0.85rem;
  font-size: 1.05rem;
}

.btn-danger:hover:not(:disabled) {
  background: #c82333;
}

.msg {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-size: 0.95rem;
  display: none;
}

.msg.error {
  background: #f8d7da;
  color: var(--color-error);
  border: 1px solid #f5c6cb;
}

.msg.success {
  background: #d4edda;
  color: var(--color-success);
  border: 1px solid #c3e6cb;
}

.msg.visible {
  display: block;
}

#step-verify {
  display: none;
}

#step-success {
  display: none;
  text-align: center;
  padding: 2rem 0;
}

#step-success h2 {
  color: var(--color-success);
  border-bottom: none;
  margin-bottom: 0.5rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  margin: 0 0.5rem;
}

.site-footer a:hover {
  color: #fff;
}

/* ---------- language switcher ---------- */

.lang-switch {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  margin-left: 1.25rem;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.8);
}

[data-lang="en"] .i18n-zh,
[data-lang="zh"] .i18n-en {
  display: none !important;
}

/* ---------- responsive ---------- */

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .header-nav a {
    margin-left: 0.75rem;
    font-size: 0.8rem;
  }

  .lang-switch {
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  .input-row {
    flex-direction: column;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .link-cards {
    grid-template-columns: 1fr;
  }
}
