@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Modern Futuristic Calm Glassmorphism for Rozenberg RSES */
  --bg-color: #0c101d;
  --bg-secondary: #131b2e;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(139, 92, 246, 0.35);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-light: rgba(139, 92, 246, 0.15);
  --accent-color: #38bdf8;
  --accent-hover: #0284c7;
  --accent-gold: #f59e0b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;

  --glass-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.08);
  --btn-shadow: 0 4px 16px 0 rgba(139, 92, 246, 0.35);
  --font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(19, 27, 46, 0.7) 0%, transparent 100%);
  background-attachment: fixed;
  padding: 1.5rem;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

/* Glassmorphism Card */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.7), rgba(56, 189, 248, 0.7), transparent);
}

.card:hover {
  border-color: var(--card-hover-border);
}

/* Header & Typography */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

h1 {
  font-size: 2.2rem;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Badge */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

label {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
}

input, select, textarea {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  background: rgba(15, 23, 42, 0.85);
}

input::placeholder {
  color: #64748b;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--btn-shadow);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px 0 rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, #9061f9 0%, #6d28d9 100%);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  color: #ffffff;
}

.btn-accent {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px 0 rgba(2, 132, 199, 0.35);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 8px 24px 0 rgba(2, 132, 199, 0.45);
}

.actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Instructions Box */
.instructions-box {
  background: rgba(15, 23, 42, 0.5);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem;
  margin: 1.75rem 0;
  text-align: left;
}

.instructions-box h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: #c4b5fd;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.instructions-box p {
  font-size: 1rem;
  line-height: 1.7;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

/* Mandatory Question Top Banner (Prompt 3.3) */
.instruction-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(56, 189, 248, 0.15) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  color: #e0e7ff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Progress Container */
.progress-container {
  margin-bottom: 1.75rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-color) 100%);
  width: 0%;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 999px;
}

/* Question Area */
.question-text {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 1.75rem;
  color: #ffffff;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.option-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  color: #f1f5f9;
  font-size: 1.05rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.option-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateX(4px);
  color: #ffffff;
}

.option-btn:active {
  transform: translateX(2px) scale(0.99);
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 0.9rem;
  color: #c4b5fd;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Report Styles */
.user-details-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  text-align: left;
}

.user-field-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

.user-field-val {
  font-size: 1rem;
  font-weight: 600;
  color: #f3f4f6;
  word-break: break-word;
}

/* Participant Report Cards */
.result-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(56, 189, 248, 0.15) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  text-align: left;
}

.result-banner-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.result-banner-subtitle {
  font-size: 1.05rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.result-motto {
  font-size: 1.1rem;
  font-style: italic;
  color: #fef08a;
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #f59e0b;
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}

.report-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 1.5rem 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.report-card-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.advice-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.advice-item {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 1rem;
  color: #e2e8f0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.advice-item::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.concluding-note {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  text-align: left;
}

.concluding-note h4 {
  color: #34d399;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.concluding-note p {
  color: #e2e8f0;
  font-size: 0.98rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Clinical Report (raport2) Styles */
.score-display-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.score-main {
  text-align: left;
}

.score-num {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-denom {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 500;
}

.clinical-badge {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-low {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-norm {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-high {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Clinical Table */
.clinical-table-wrapper {
  overflow-x: auto;
  margin: 1.75rem 0;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.clinical-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.clinical-table th {
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-weight: 600;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--card-border);
}

.clinical-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.clinical-table tr:last-child td {
  border-bottom: none;
}

.clinical-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Mandatory Disclaimer */
.disclaimer-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 2rem 0;
  text-align: left;
  font-size: 0.92rem;
  color: #fde68a;
  line-height: 1.6;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
  body {
    padding: 0.75rem;
  }
  .card {
    padding: 1.5rem;
    border-radius: 16px;
  }
  h1 {
    font-size: 1.7rem;
  }
  .question-text {
    font-size: 1.15rem;
  }
  .score-display-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .user-details-card {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
  }
  .container {
    max-width: 100% !important;
    width: 100% !important;
  }
  .card {
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .no-print, .actions, .btn {
    display: none !important;
  }
  h1, h2, h3, h4, h5, p, span, div {
    color: #000000 !important;
    -webkit-text-fill-color: initial !important;
  }
  .clinical-table th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }
  .clinical-table td {
    color: #1e293b !important;
    border-color: #e2e8f0 !important;
  }
}
