/* ===============================
   Secret Santa Christmas Theme
   Palette:
   - Christmas  #96291C
   - Reindeer   #B7A596
   - Wish       #5B8498
   - Holly      #184F61
   - Night      #191C20
   =============================== */

:root {
  --christmas: #96291C;
  --reindeer: #B7A596;
  --wish: #5B8498;
  --holly: #184F61;
  --night: #191C20;

  --bg-gradient: radial-gradient(circle at top, #5b8498 0%, #184f61 35%, #191c20 85%);
  --card-radius: 18px;
  --card-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.25s ease-out;
  --border-candy: linear-gradient(
    45deg,
    #ffffff 0,
    #ffffff 18%,
    #96291c 18%,
    #96291c 35%,
    #ffffff 35%,
    #ffffff 53%,
    #96291c 53%,
    #96291c 70%,
    #ffffff 70%,
    #ffffff 100%
  );
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ========== Global ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  color: #f6f7f9;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow-x: hidden;
}

/* Cozy decorative frame around the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 16px;
  border-radius: 32px;
  padding: 4px;
  background-image: var(--border-candy);
  background-size: 30px 30px;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.9;
  z-index: 0;
}

/* Gentle falling snow effect */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0, rgba(255, 255, 255, 0.8) 2px, transparent 3px),
    radial-gradient(circle, rgba(255, 255, 255, 0.4) 0, rgba(255, 255, 255, 0.4) 2px, transparent 3px);
  background-size: 180px 180px, 260px 260px;
  animation: snow-fall 18s linear infinite;
  opacity: 0.55;
  z-index: 0;
}

@keyframes snow-fall {
  0% {
    transform: translateY(-40px);
  }
  100% {
    transform: translateY(40px);
  }
}

/* ========== Layout Wrapper ========== */

.app-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  z-index: 1;
}

/* ========== Header ========== */

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

.site-title {
  font-size: clamp(2.1rem, 2.6vw + 1.4rem, 2.8rem);
  margin: 0 0 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(150, 41, 28, 0.8);
  position: relative;
  display: inline-block;
  padding: 4px 14px 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(150, 41, 28, 0.7), rgba(24, 79, 97, 0.8));
  border: 1px solid rgba(183, 165, 150, 0.7);
}

.site-title::before,
.site-title::after {
  content: "🎁";
  font-size: 1.2rem;
  margin: 0 4px;
}

.tagline {
  font-size: 0.96rem;
  color: rgba(231, 225, 216, 0.9);
  margin: 4px 0 0;
}

.subtitle {
  font-size: 0.9rem;
  color: rgba(183, 165, 150, 0.9);
  margin-top: 2px;
}

/* ========== Sections / Panels ========== */

.section {
  background: rgba(25, 28, 32, 0.96);
  border-radius: var(--card-radius);
  border: 1px solid rgba(183, 165, 150, 0.65);
  padding: 18px 16px 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px dashed rgba(91, 132, 152, 0.6);
  opacity: 0.8;
  pointer-events: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.section-header-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #96291c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(150, 41, 28, 0.65);
}

.section-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fdfaf7;
}

/* ========== Typography Helpers ========== */

p {
  margin: 0 0 10px;
  color: rgba(237, 233, 227, 0.9);
  font-size: 0.95rem;
}

small,
.helper-text {
  font-size: 0.8rem;
  color: rgba(183, 165, 150, 0.9);
}

/* ========== Forms & Inputs ========== */

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label {
  font-size: 0.92rem;
  color: rgba(237, 233, 227, 0.95);
  display: block;
}

/* Reindeer text fields */
input,
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid rgba(25, 28, 32, 0.9);
  background: rgba(183, 165, 150, 0.96);
  color: #191c20;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), background 0.2s;
}

textarea {
  border-radius: 14px;
  resize: vertical;
  min-height: 80px;
}

input::placeholder,
textarea::placeholder {
  color: rgba(25, 28, 32, 0.7);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--wish);
  box-shadow: 0 0 0 2px rgba(91, 132, 152, 0.7);
  transform: translateY(-1px);
  background: #e3d7c8;
}

/* ========== Buttons ========== */

button,
.btn {
  appearance: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  background-image: linear-gradient(135deg, var(--christmas), #b84030);
  color: #fffaf3;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(150, 41, 28, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform var(--transition-med), box-shadow var(--transition-med), filter var(--transition-med);
}

button.secondary,
.btn.secondary {
  background-image: linear-gradient(135deg, var(--wish), var(--holly));
  box-shadow: 0 8px 18px rgba(91, 132, 152, 0.6);
}

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

button:hover:not(:disabled),
.btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6);
  filter: brightness(1.05);
}

button:active:not(:disabled),
.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
}

/* Button layout */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* ========== Rules Section ========== */

.rules-section {
  margin-top: 4px;
}

.rules-card {
  margin-top: 4px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(183, 165, 150, 0.8);
  background: radial-gradient(circle at top, rgba(24, 79, 97, 0.55), rgba(25, 28, 32, 0.98));
}

.rules-title {
  font-size: 0.98rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
  color: #fdfaf7;
}

.rules-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.rules-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: rgba(237, 233, 227, 0.9);
}

.rules-list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  top: 0;
  color: #ffe082;
}

.rules-note {
  font-size: 0.82rem;
  color: rgba(231, 225, 216, 0.95);
}

.rules-note strong {
  color: #ffe9aa;
}

/* ========== Footer ========== */

footer {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(183, 165, 150, 0.9);
}

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

footer a:hover {
  text-decoration: underline;
}

/* ========== Table styles (if used later) ========== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 0.9rem;
}

thead {
  background: rgba(24, 79, 97, 0.95);
}

th,
td {
  padding: 8px 10px;
  text-align: left;
}

th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  color: #fdfaf7;
  border-bottom: 1px solid rgba(183, 165, 150, 0.8);
}

tbody tr:nth-child(odd) {
  background: rgba(25, 28, 32, 0.96);
}

tbody tr:nth-child(even) {
  background: rgba(24, 79, 97, 0.25);
}

tbody tr:hover {
  background: rgba(150, 41, 28, 0.3);
}

/* Small pill labels if needed */
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.78rem;
  background: rgba(183, 165, 150, 0.18);
  border: 1px solid rgba(183, 165, 150, 0.7);
  color: rgba(248, 244, 238, 0.95);
}

/* ========== Alerts / Error messages (if used) ========== */

.alert {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-error {
  background: rgba(150, 41, 28, 0.13);
  border: 1px solid rgba(150, 41, 28, 0.7);
  color: #ffe6e1;
}

.alert-success {
  background: rgba(24, 79, 97, 0.25);
  border: 1px solid rgba(91, 132, 152, 0.9);
  color: #e0f6ff;
}

/* ========== Responsive Tweaks ========== */

@media (max-width: 480px) {
  body {
    padding: 18px 8px;
  }

  body::before {
    inset: 8px;
  }

  .section {
    padding: 14px 10px 16px;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  button,
  .btn {
    width: 100%;
  }
}

/* ========== Modal (success popup) ========== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55); /* gray/black tint */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
  z-index: 50;
}

.modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: rgba(25, 28, 32, 0.98);
  border-radius: 20px;
  border: 1px solid rgba(183, 165, 150, 0.85);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  padding: 22px 20px 20px;
  max-width: 420px;
  width: 90%;
  position: relative;
}

.modal-title {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: #fffaf3;
  text-align: center;
}

.modal-body {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: rgba(237, 233, 227, 0.95);
  text-align: center;
}

.modal-body.small {
  font-size: 0.85rem;
}

.modal-buttons {
  justify-content: center;
  margin-top: 12px;
}

