/* The Bell of the Great Wall — global styles */

:root {
  --ink: #080c0b;
  --ink-light: #121a18;
  --jade: #2a4f46;
  --jade-light: #3d6b60;
  --gold: #c8a951;
  --gold-dim: #8f7a3a;
  --red: #9a1b1b;
  --paper: #f3ecd6;
  --text: #f0e6d2;
  --text-muted: #a89f8e;
  --terminal-green: #33ff33;
  --terminal-amber: #ffb000;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: var(--ink);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  /* Subtle ink-wash texture using radial gradients */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(42, 79, 70, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(154, 27, 27, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(200, 169, 81, 0.05) 0%, transparent 60%);
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* (Removed decorative corner ring circles that previously appeared at page corners) */

/* Header & disclaimer */
.disclaimer-banner {
  background: rgba(154, 27, 27, 0.12);
  border-bottom: 1px solid rgba(200, 169, 81, 0.3);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.site-title {
  font-size: 2rem;
  margin: 0;
  color: var(--gold);
  letter-spacing: 2px;
}

.site-subtitle {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Main layout */
main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}

/* Cards / panels */
.panel {
  background: rgba(18, 26, 24, 0.85);
  border: 1px solid rgba(200, 169, 81, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.panel h2 {
  margin-top: 0;
  color: var(--gold);
  font-size: 1.3rem;
}

/* Forms */
label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

textarea,
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(200, 169, 81, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--gold);
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 0.9rem;
  margin-top: 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--jade), var(--jade-light));
  color: #fff;
  font-size: 1.05rem;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hide elements until shown by JS (admin panels, error notes, etc.) */
.hidden {
  display: none !important;
}

/* ========================
   Footer disclaimer + cookie banner (GDPR)
   ======================== */
.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.footer-links a {
  margin: 0 0.5rem;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: #101614;
  border-top: 1px solid rgba(200, 169, 81, 0.35);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

.cookie-text {
  flex: 1 1 280px;
  min-width: 0;
}

.cookie-text a {
  color: var(--gold);
}

.btn-small {
  width: auto;
  margin-top: 0;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  display: inline-block;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

/* Special S-card golden glow animation for the displayed card */
.special-card {
  animation: specialGlow 2.4s ease-out forwards;
}

@keyframes specialGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
  35% {
    box-shadow: 0 0 60px 12px rgba(212, 175, 55, 0.35);
  }
  100% {
    box-shadow: 0 0 24px 4px rgba(212, 175, 55, 0.15);
  }
}

/* Sample / result card display */
.card-stage {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

#cardCanvas,
#sampleCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.card-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(200, 169, 81, 0.2);
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a {
  margin: 0 0.5rem;
}

/* Terms / privacy lists */
.legal-content h2 {
  color: var(--gold);
  margin-top: 1.5rem;
}

.legal-content p,
.legal-content li {
  color: var(--text);
}

/* Admin table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

th, td {
  padding: 0.6rem;
  border-bottom: 1px solid rgba(200, 169, 81, 0.2);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold);
}

.actions button {
  margin-right: 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.8rem;
}

.actions button:hover {
  background: rgba(200, 169, 81, 0.15);
}

/* ========================
   Retro terminal animation
   ======================== */
.terminal-page {
  background-color: #121814;
  color: #c8b977;
  font-family: 'Courier New', Courier, monospace;
  overflow-x: hidden;
  /* Deep old-paper brown-black to ink-green gradient with paper grain */
  background-image:
    radial-gradient(circle, rgba(200, 169, 81, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse at 15% 20%, rgba(200, 169, 81, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 25%, rgba(42, 79, 70, 0.18) 0%, transparent 42%),
    radial-gradient(ellipse at 50% 85%, rgba(200, 169, 81, 0.07) 0%, transparent 48%),
    linear-gradient(180deg, #0d100e 0%, #161c17 50%, #25221b 82%, #f3ecd6 100%);
  background-size: 3px 3px, auto, auto, auto, auto;
}

/* Soft ink-wash mountain silhouette at the bottom */
.terminal-mountains {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.12;
  background: rgba(10, 14, 12, 0.85);
  clip-path: polygon(
    0% 100%, 0% 75%, 12% 62%, 25% 74%, 38% 58%, 52% 72%,
    66% 56%, 78% 70%, 90% 60%, 100% 72%, 100% 100%
  );
}

/* (Removed full-screen CRT scanline overlay on the terminal page) */

.terminal-container {
  position: relative;
  z-index: 5;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.terminal-box {
  border: 3px solid rgba(200, 169, 81, 0.65);
  padding: 1.5rem;
  background: rgba(10, 14, 12, 0.78);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(200, 169, 81, 0.12),
    inset 0 0 40px rgba(0, 0, 0, 0.25);
}

.terminal-line {
  font-size: 1.1rem;
  min-height: 1.6rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c8b977;
  text-shadow: 0 0 2px rgba(200, 169, 81, 0.25);
}

.cursor {
  display: inline-block;
  width: 0.6em;
  background: #c8b977;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.terminal-progress {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #c8b977;
}

.terminal-star {
  margin-top: 1rem;
  font-size: 1.5rem;
  text-align: center;
  min-height: 2rem;
  color: #c8b977;
  opacity: 0.85;
}

/* Result card fade-in, now blending with the warm bottom gradient */
.result-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  margin-top: 2rem;
  padding-top: 1rem;
}

.result-section.visible {
  opacity: 1;
  transform: translateY(0);
}@media (min-width: 640px) {
  .site-title {
    font-size: 2.6rem;
  }

  .panel {
    padding: 2rem;
  }

  .terminal-line,
  .terminal-progress {
    font-size: 1.25rem;
  }
}



