/* ===== DESIGN SYSTEM: erodate.pl Mini-Apki ===== */

:root {
  /* Colors */
  --primary: #e84393;           /* Różowo-fioletowy */
  --primary-dark: #c0306e;
  --bg: #fef6f9;                /* Jasne tło */
  --card: #ffffff;              /* Karty */
  --text: #1a1a2e;              /* Tekst główny */
  --text-muted: #666;           /* Tekst szary */
  --border: #f0d0e0;            /* Granice */
  --success: #10b981;           /* Zielony */
  --error: #ef4444;             /* Czerwony */

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;
  --font-size-large: 18px;
  --font-size-xlarge: 24px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 600;
  --font-weight-black: 700;

  /* Spacing & Layout */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(232, 67, 147, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --transition: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

h1 { font-size: 32px; }
h2 { font-size: 28px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p { margin: 12px 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT APP ===== */
.app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 16px;
  background: var(--bg);
}

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

.app-title {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin-bottom: 8px;
}

.app-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  margin: 20px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 100px;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0;
  font-weight: var(--font-weight-medium);
}

/* ===== CARDS & CONTAINERS ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow);
  animation: fadeIn 0.3s ease;
}

.card-header {
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 16px;
  color: var(--text);
}

.card-body {
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== QUESTIONS ===== */
.question-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  animation: fadeIn 0.4s ease;
}

.question-text {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.4;
}

/* ===== ANSWERS / BUTTONS ===== */
.answer-btn,
.option-btn {
  width: 100%;
  padding: 14px 20px;
  margin: 10px 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-family: var(--font);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}

.answer-btn:hover,
.option-btn:hover {
  border-color: var(--primary);
  background: #fff0f8;
  transform: translateX(4px);
}

.answer-btn.selected,
.option-btn.selected {
  border-color: var(--primary);
  background: #fff0f8;
  font-weight: var(--font-weight-medium);
}

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

/* Radio button / Checkbox styling */
.answer-btn input[type="radio"],
.answer-btn input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

/* ===== SLIDERS ===== */
.slider-container {
  margin: 20px 0;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
}

.slider-value {
  color: var(--primary);
  font-weight: var(--font-weight-bold);
  font-size: 18px;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

/* ===== INPUT FIELDS ===== */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  margin: 12px 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--card);
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 67, 147, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* ===== BUTTONS ===== */
.btn,
.button {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
}

.btn-primary,
.button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-primary:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232, 67, 147, 0.24);
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: #e8d0e0;
}

.btn-success {
  background: var(--success);
  color: white;
}

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

.btn-danger {
  background: var(--error);
  color: white;
}

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

.btn-block {
  display: block;
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

/* ===== CTA BLOCK (CALL TO ACTION) ===== */
.cta-block {
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.05), rgba(192, 48, 110, 0.05));
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 32px 0;
  text-align: center;
  animation: slideUp 0.5s ease;
}

.cta-lead {
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.4;
}

.btn-cta {
  display: block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-decoration: none;
  padding: 18px 32px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  text-align: center;
  margin: 20px 0;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  animation: pulse 2s infinite;
  box-shadow: 0 4px 24px rgba(232, 67, 147, 0.2);
}

.btn-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(232, 67, 147, 0.32);
  text-decoration: none;
}

.cta-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ===== RESULTS / OUTCOMES ===== */
.result-card {
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.08), rgba(192, 48, 110, 0.08));
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  margin: 24px 0;
  animation: slideUp 0.5s ease;
}

.result-title {
  font-size: 28px;
  font-weight: var(--font-weight-black);
  color: var(--primary);
  margin-bottom: 12px;
}

.result-description {
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
}

.result-stat {
  font-size: 32px;
  font-weight: var(--font-weight-black);
  color: var(--primary);
  margin: 16px 0;
}

.result-unit {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: var(--font-weight-normal);
}

/* ===== METRICS / STATISTICS ===== */
.stat-box {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 28px;
  font-weight: var(--font-weight-black);
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== SHARE BUTTON ===== */
.share-container {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.btn-share {
  flex: 1;
  padding: 12px 20px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  transition: var(--transition);
}

.btn-share:hover {
  border-color: var(--primary);
  background: #fff0f8;
}

.btn-share.success {
  background: var(--success);
  color: white;
  border-color: var(--success);
  animation: flash 0.4s ease;
}

/* ===== CHECKBOXES & RADIOS ===== */
.checkbox-group,
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-item label,
.radio-item label {
  cursor: pointer;
  font-size: 14px;
}

/* ===== MODAL / OVERLAY ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: slideUp 0.3s ease;
}

.modal-title {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 16px;
}

.modal-text {
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: 12px;
}

.modal-buttons button {
  flex: 1;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  background: var(--border);
  color: var(--text);
  margin: 4px;
}

.badge-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-error {
  background: var(--error);
  color: white;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes flash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none; }
.visible { display: block; }
.opacity-50 { opacity: 0.5; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .app-wrapper {
    padding: 16px 12px;
  }

  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }

  .question-card {
    padding: 20px;
  }

  .modal-content {
    width: 95%;
    padding: 24px 20px;
  }

  .btn-cta {
    padding: 16px 24px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
