/* ==========================================================================
   Organizador de Amigo Invisible - Estilos Modernos
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  --bg-app: #080c14;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-input: #0f172a;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #ec4899; /* Rosa fiesta / regalo */
  --primary-glow: rgba(236, 72, 153, 0.25);
  --accent: #8b5cf6;
  --success: #10b981;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg-app: #fdf2f8;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-focus: #db2777;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #db2777;
  --primary-glow: rgba(219, 39, 119, 0.2);
  --accent: #7c3aed;
  --success: #059669;
  color-scheme: light;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-wrapper {
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Hero */
.tool-hero {
  margin-bottom: 1.5rem;
}

.tool-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.tool-hero h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.tool-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 800px;
}

/* Card */
.secret-santa-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  margin-bottom: 2rem;
}

.santa-step-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.santa-step-section.hidden {
  display: none;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1rem;
}

.step-num {
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.step-num.success {
  background: var(--success);
}

.step-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-main);
}

.santa-config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .santa-config-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-field-wrap {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.form-input,
.form-input-date,
.form-select {
  width: 100%;
  min-height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  transition: all 0.2s;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.form-input:focus,
.form-input-date:focus,
.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.unit-suffix {
  position: absolute;
  right: 1rem;
  font-family: var(--font-main);
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

/* Participants List */
.participants-list-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.add-participant-row {
  display: flex;
  gap: 0.5rem;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 48px;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.btn-add:hover {
  opacity: 0.9;
}

.participants-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 40px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

[data-theme="light"] .participants-chips {
  background: #f8fafc;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.btn-remove-chip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}

.btn-remove-chip:hover {
  color: #ef4444;
}

/* Exclusions */
.exclusions-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sub-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-main);
}

.add-exclusion-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.excl-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ef4444;
  text-transform: uppercase;
}

.btn-sm-action {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
}

.btn-sm-action:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.exclusions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exclusion-badge {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-remove-excl {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-weight: 800;
}

/* Actions Row */
.santa-actions-row {
  margin-top: 1rem;
}

.btn-draw-start {
  width: 100%;
  min-height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 4px 20px var(--primary-glow);
  transition: all 0.2s;
}

.btn-draw-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
}

/* Step 2 Reveal */
.reveal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .reveal-tabs {
    grid-template-columns: 1fr;
  }
}

.reveal-tab {
  background: var(--bg-card);
  border: 1.5px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.reveal-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.reveal-content-box {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

[data-theme="light"] .reveal-content-box {
  background: #ffffff;
}

.reveal-content-box.hidden {
  display: none;
}

.reveal-instruction {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Secret Reveal Card */
.secret-reveal-card {
  background: rgba(0, 0, 0, 0.35);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.secret-reveal-card:hover {
  background: rgba(236, 72, 153, 0.08);
}

.gift-icon-big {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

.card-hidden-state h4 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.card-hidden-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-revealed-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.card-revealed-state.hidden {
  display: none;
}

.revealed-sub {
  font-size: 1rem;
  color: var(--text-muted);
}

.target-person-name {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.gift-details-reminder {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn-hide-again {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

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

/* Share Links List */
.share-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.share-person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-whatsapp-share {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
}

.btn-copy-link {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
}

.santa-footer-reset {
  text-align: center;
  margin-top: 1rem;
}

.btn-sm-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-sm-ghost:hover {
  color: var(--primary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.modal-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.modal-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.btn-primary {
  width: 100%;
  min-height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

/* Edu Grid */
.percent-edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .percent-edu-grid {
    grid-template-columns: 1fr;
  }
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.edu-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.edu-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
