
    :root {
  --bg-main: #050816;
  --bg-card: rgba(9, 9, 22, 0.9);
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.1);
  --accent-strong: #22c55e;
  --danger: #fb7185;
  --warning: #fbbf24;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --glass-blur: 22px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --transition-fast: 150ms ease-out;
  --transition-med: 260ms ease-out;
}

    * {
      box-sizing: border-box;
    }

    html, body {
      margin: 0;
      padding: 0;
      height: 100%;
      font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--text-main);
      background: radial-gradient(circle at 0% 0%, #0f172a 0, #020617 40%, #000 100%);
      -webkit-font-smoothing: antialiased;
    }

    body {
      display: flex;
      align-items: stretch;
      justify-content: center;
    }

    .app-shell {
      min-height: 100vh;
      width: 100%;
      max-width: 1280px;
      padding: 16px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 16px;
      position: relative;
      overflow-x: hidden;
      overflow-y: visible;
    }
.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}
header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
header .brand:hover {
  opacity: 0.92;
}

.top-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.top-nav a:hover {
  border-color: rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.9);
}

.top-nav a.active {
  border-color: rgba(52, 211, 153, 0.6);
  color: #ecfdf5;
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.25), rgba(21, 128, 61, 0.7));
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.6);
}

    .app-shell::before {
      content: "";
      position: fixed;
      inset: -100px;
      background:
        radial-gradient(circle at 0% 20%, rgba(52, 211, 153, 0.12), transparent 55%),
        radial-gradient(circle at 100% 80%, rgba(59, 130, 246, 0.22), transparent 55%),
        radial-gradient(circle at 50% 0%, rgba(236, 72, 153, 0.16), transparent 55%);
      opacity: 0.9;
      z-index: -2;
      filter: blur(8px);
      animation: bgShift 22s ease-in-out infinite alternate;
    }

    @keyframes bgShift {
      0% {
        transform: translate3d(0, 0, 0) scale(1);
      }
      50% {
        transform: translate3d(-12px, 18px, 0) scale(1.03);
      }
      100% {
        transform: translate3d(10px, -14px, 0) scale(1.05);
      }
    }

    .app-shell::after {
      content: "";
      position: fixed;
      inset: 0;
      background-image: linear-gradient(
        rgba(15, 23, 42, 0.65),
        rgba(2, 6, 23, 0.9)
      );
      z-index: -1;
      mix-blend-mode: soft-light;
    }

    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 14px;
      border-radius: var(--radius-xl);
      background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.6));
      border: 1px solid rgba(148, 163, 184, 0.25);
      box-shadow: var(--shadow-soft);
      backdrop-filter: blur(var(--glass-blur));
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .brand-logo {
      width: 40px;
      height: 40px;
      border-radius: 14px;
      background:
        conic-gradient(from 180deg, #22c55e, #38bdf8, #e879f9, #22c55e);
      padding: 2px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8), 0 20px 35px rgba(0, 0, 0, 0.7);
    }

    .brand-logo-inner {
      width: 100%;
      height: 100%;
      border-radius: 12px;
      background: radial-gradient(circle at 30% 0%, #22c55e 0, #0f172a 40%, #020617 90%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 0.9rem;
      letter-spacing: 0.06em;
      color: #f0fdf4;
      text-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
    }

    .brand-text-title {
      font-size: 1.2rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      display: flex;
      align-items: baseline;
      gap: 6px;
    }
/* Knowledge strip / article links */
.topics-strip {
  grid-column: 1 / -1;
  margin-top: 8px;
  background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9));
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
}

.topics-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topics-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
}

.topics-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topics-links a {
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  text-decoration: none;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.85);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.topics-links a:hover {
  border-color: rgba(52, 211, 153, 0.7);
  color: #ecfdf5;
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.25), rgba(21, 128, 61, 0.7));
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
  transform: translateY(-0.5px);
}

@media (max-width: 720px) {
  .topics-strip {
    padding: 10px 12px;
  }
.topics-strip {
    display: none !important;
  }
  .topics-links {
    gap: 6px;
  }

  .topics-links a {
    font-size: 0.76rem;
  }
}

    .brand-text-title span.sugar {
      color: var(--text-main);
    }

    .brand-text-title .risk {
      position: relative;
      display: inline-flex;
      align-items: center;
      color: var(--accent-strong);
    }

    .brand-text-title .dotcom {
      font-size: 0.75rem;
      font-weight: 600;
      color: #a3a3a3;
      margin-left: 2px;
      opacity: 0.9;
      letter-spacing: -0.5px;
      position: relative;
      top: -1px;
    }

    .brand-subtitle {
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .header-pill {
      padding: 4px 12px;
      border-radius: var(--radius-pill);
      font-size: 0.75rem;
      display: flex;
      align-items: center;
      gap: 8px;
      border: 1px solid rgba(52, 211, 153, 0.4);
      background: radial-gradient(circle at 0 0, rgba(52, 211, 153, 0.2), transparent 60%);
      color: #bbf7d0;
      white-space: nowrap;
    }

    .header-pill-dot {
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: #22c55e;
      box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
    }

    main {
      flex: 1;
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
      gap: 16px;
      align-items: stretch;
    }

    @media (max-width: 900px) {
      main {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    .card {
      background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.8));
      border-radius: var(--radius-xl);
      padding: 16px 18px 18px;
      border: 1px solid var(--border-subtle);
      box-shadow: var(--shadow-soft);
      backdrop-filter: blur(var(--glass-blur));
      position: relative;
      overflow: hidden;
    }

    .card::before {
      content: "";
      position: absolute;
      inset: -60%;
      background: radial-gradient(circle at 10% 0, rgba(52, 211, 153, 0.08), transparent 55%);
      opacity: 1;
      pointer-events: none;
    }

    .card-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .card-title-area {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .card-title {
      font-size: 1.15rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .chip {
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 3px 8px;
      border-radius: var(--radius-pill);
      border: 1px solid rgba(148, 163, 184, 0.5);
      color: var(--text-muted);
    }

    .card-subtitle {
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .card-meta {
      font-size: 0.74rem;
      color: var(--text-muted);
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
    }

    .pill-soft {
      padding: 3px 10px;
      border-radius: var(--radius-pill);
      border: 1px solid rgba(148, 163, 184, 0.4);
      background: rgba(15, 23, 42, 0.7);
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .pill-soft span.dot {
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: #22c55e;
    }

    /* Form */

    form {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px 12px;
      position: relative;
      z-index: 1;
    }

    @media (max-width: 720px) {
      form {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 0.8rem;
    }

    .field-units {
      grid-column: 1 / -1;
    }

    .field-label-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
    }

    label {
      font-size: 0.8rem;
      color: var(--text-main);
    }

    .field-helper {
      font-size: 0.7rem;
      color: var(--text-muted);
    }

    .input, select {
      width: 100%;
      border-radius: var(--radius-lg);
      padding: 9px 11px;
      border: 1px solid rgba(148, 163, 184, 0.5);
      background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.95));
      color: var(--text-main);
      font-size: 0.83rem;
      outline: none;
      transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
    }

    .input::placeholder {
      color: rgba(148, 163, 184, 0.7);
    }

    .input:focus,
    select:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4), 0 0 24px rgba(34, 197, 94, 0.18);
      transform: translateY(-0.5px);
    }

    select {
      appearance: none;
      background-image: linear-gradient(45deg, transparent 50%, rgba(148, 163, 184, 0.9) 50%), linear-gradient(135deg, rgba(148, 163, 184, 0.9) 50%, transparent 50%);
      background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
      background-size: 6px 6px, 6px 6px;
      background-repeat: no-repeat;
      padding-right: 30px;
    }

    /* Selecturi verzi (activity + advanced factors) */
    .input.activity-select,
    .input.adv-select {
      background: rgba(34, 197, 94, 0.25);
      border-color: rgba(52, 211, 153, 0.6);
      color: #ecfdf5;
      backdrop-filter: blur(6px);
    }

    .input.activity-select option,
    .input.adv-select option {
      background-color: #065f46;
      color: #ffffff;
    }

    select.activity-select,
    select.adv-select {
      -webkit-appearance: none;
      appearance: none;
    }

    .segmented {
      display: inline-flex;
      padding: 2px;
      border-radius: var(--radius-pill);
      background: rgba(15, 23, 42, 0.85);
      border: 1px solid rgba(148, 163, 184, 0.5);
      gap: 4px;
      flex-wrap: wrap;
    }

    .segmented button {
      border-radius: var(--radius-pill);
      border: none;
      padding: 6px 9px;
      background: transparent;
      color: var(--text-muted);
      font-size: 0.75rem;
      cursor: pointer;
      transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
      white-space: nowrap;
    }

    .segmented button.active {
      background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.25), rgba(21, 128, 61, 0.7));
      color: #ecfdf5;
      box-shadow: 0 0 16px rgba(34, 197, 94, 0.6);
      transform: translateY(-0.5px);
    }

    .segmented button:focus-visible {
      outline: 1px solid rgba(34, 197, 94, 0.7);
      outline-offset: 2px;
    }

    .form-footer {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-top: 4px;
      flex-wrap: wrap;
    }

    .submit-btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: linear-gradient(120deg, #22c55e, #4ade80, #22c55e);
  color: #022c22;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.35);
  transition: transform var(--transition-med),
    box-shadow var(--transition-med),
    filter var(--transition-fast);
  white-space: nowrap;
}

/* ERROR ALERT WRAPPER */
.error-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.55);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  color: #ef4444;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(2px);
}

/* ICONA */
.error-alert .error-icon {
  font-size: 1.25rem;
  line-height: 1;
  color: #ef4444;
}

/* TEXT */
.error-alert-text {
  display: inline-block;
}
.select-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
.status-message {
  margin: 12px auto 8px auto;  /* pune-l frumos pe centru */
  font-size: 0.95rem;
  font-weight: 600;
  display: none;
  text-align: center;          /* CENTRARE TEXT */
  max-width: 480px;            /* îl ținem compact ca designul SugarRisk */
  line-height: 1.4;
}

.status-message.ok {
  color: #22c55e;
}

.status-message.warn {
  color: #f97316;
}

.status-message.danger {
  color: #ef4444;
}
.status-message {
  margin: 12px auto 8px auto;  /* pune-l frumos pe centru */
  font-size: 0.95rem;
  font-weight: 600;
  display: none;
  text-align: center;          /* CENTRARE TEXT */
  max-width: 480px;            /* îl ținem compact ca designul SugarRisk */
  line-height: 1.4;
}

   .submit-btn span.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.7);
  animation: pulse 1.2s ease-in-out infinite;
}
    @keyframes pulse {
      0% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.4); opacity: 0.65; }
      100% { transform: scale(1); opacity: 1; }
    }

    .submit-btn:hover {
      transform: translateY(-1px) scale(1.01);
      filter: brightness(1.05);
      box-shadow: 0 0 4px rgba(22, 163, 74, 0.65);
    }

    .submit-btn:active {
      transform: translateY(0) scale(0.99);
      box-shadow: 0 2px 4px rgba(22, 163, 74, 0.5);
    }

    .disclaimer {
      font-size: 0.7rem;
      color: var(--text-muted);
      max-width: 340px;
    }

    .disclaimer strong {
      color: #e5e7eb;
    }

    /* Units helpers */

    .unit-group {
      display: none;
    }

    .unit-group.active {
      display: block;
    }

    .subfield-row {
      display: flex;
      gap: 6px;
    }

    .subfield-row .input {
      flex: 1;
    }

    /* Advanced factors box */

    .advanced-box {
      grid-column: 1 / -1;
      margin-top: 8px;
      border: 1px solid rgba(148, 163, 184, 0.35);
      border-radius: var(--radius-lg);
      background: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(10px);
      padding: 8px 10px;
    }

    .advanced-toggle {
      width: 100%;
      background: none;
      border: none;
      color: #cbd5e1;
      font-size: 0.83rem;
      text-align: left;
      padding: 4px 2px;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .advanced-toggle:hover {
      color: var(--accent);
    }

    .advanced-toggle .arrow {
      transition: transform 0.3s ease;
      font-size: 0.9rem;
    }

    .advanced-body {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease;
      margin-top: 6px;
    }

    .advanced-body.open {
      max-height: 800px;
    }

    /* Results card */

    .results-card {
      background: radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.22), rgba(15, 23, 42, 0.95));
      border-radius: var(--radius-xl);
      padding: 16px 18px 18px;
      border: 1px solid rgba(52, 211, 153, 0.45);
      box-shadow: var(--shadow-soft);
      backdrop-filter: blur(var(--glass-blur));
      position: relative;
      overflow: hidden;
    }

    .results-card::before {
      content: "";
      position: absolute;
      inset: -80%;
      background:
        radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.24), transparent 45%),
        conic-gradient(from 220deg, rgba(34, 197, 94, 0.1), transparent 30%, rgba(59, 130, 246, 0.2), transparent 70%, rgba(236, 72, 153, 0.22));
      opacity: 0.7;
      pointer-events: none;
      mix-blend-mode: screen;
    }

    .results-inner {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      gap: 10px;
      height: 100%;
    }

    .results-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .results-title {
      font-size: 0.9rem;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .results-badge {
      font-size: 0.7rem;
      padding: 3px 10px;
      border-radius: var(--radius-pill);
      border: 1px solid rgba(15, 23, 42, 0.8);
      background: rgba(15, 23, 42, 0.5);
      color: #bbf7d0;
    }

    .risk-score-row {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 12px;
      margin-top: 4px;
      flex-wrap: wrap;
    }

    .risk-score-main {
      display: flex;
      align-items: baseline;
      gap: 6px;
    }

    .risk-score-value {
      font-size: 1.9rem;
      font-weight: 600;
      letter-spacing: 0.04em;
    }

    .risk-score-max {
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .risk-score-label {
  font-size: 0.75rem;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.85);
  background: rgba(15, 23, 42, 0.7);
  text-align: center;      /* centrare text */
  align-self: center;      /* centrată și ca poziție */
  min-width: 70%;          /* să arate ca o bandă sub cerc */
}


    .risk-bar-wrap {
      width: 100%;
      margin-top: 8px;
    }

    .risk-bar-track {
      width: 100%;
      height: 10px;
      border-radius: 999px;
      background: linear-gradient(90deg, #22c55e, #fbbf24, #fb7185);
      position: relative;
      overflow: hidden;
      box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.7), 0 18px 30px rgba(15, 23, 42, 0.7);
    }

    .risk-bar-indicator {
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 16px;
      height: 16px;
      border-radius: 999px;
      border: 2px solid #f9fafb;
      background: radial-gradient(circle at 30% 0, #f97316, #b91c1c);
      box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9), 0 0 22px rgba(248, 250, 252, 0.9);
      transition: left 260ms cubic-bezier(0.22, 0.68, 0, 1), transform 260ms ease-out;
    }

    .risk-bar-indicator::after {
      content: "";
      position: absolute;
      inset: -4px;
      border-radius: inherit;
      border: 1px solid rgba(248, 250, 252, 0.4);
      opacity: 0.6;
    }

    .risk-text {
      margin-top: 8px;
      font-size: 0.8rem;
      color: #e5e7eb;
    }
.results-card.is-loading .risk-text {
  text-align: center !important;
}
    .risk-text span.label {
      font-weight: 600;
    }

    .insights-grid {
      margin-top: 8px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 6px;
      font-size: 0.78rem;
    }

    .insight-item {
      border-radius: var(--radius-lg);
      padding: 7px 9px;
      background: rgba(15, 23, 42, 0.78);
      border: 1px solid rgba(148, 163, 184, 0.4);
      display: flex;
      align-items: flex-start;
      gap: 8px;
    }

    .insight-bullet {
      width: 6px;
      height: 6px;
      border-radius: 999px;
      margin-top: 4px;
      background: rgba(52, 211, 153, 0.85);
      box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
    }

    .insight-title {
      font-weight: 500;
      margin-bottom: 2px;
    }

    .insight-body {
      color: var(--text-muted);
      font-size: 0.76rem;
    }

    .data-quality {
      margin-top: auto;
      font-size: 0.7rem;
      color: #d1d5db;
      display: flex;
      align-items: center;
      gap: 6px;
      opacity: 0.9;
    }

    .data-quality span.indicator {
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: #22c55e;
      box-shadow: 0 0 14px rgba(34, 197, 94, 0.9);
    }

    /* Loading state pentru cardul de rezultate (virtual glucose test) */

/* Cerc rotund tip "spinner" deasupra benzii */

/* animație de rotire a cercului */
@keyframes spinCircle {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.results-card.is-loading .risk-loader {
    display: block;
}
.risk-loader {
    display: none;
    text-align: center;
    padding: 20px;
}

@keyframes stripMove {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.results-card.is-loading {
  display: block;
  margin-bottom: 0;
}

/* ascundem DOAR bara și restul, nu cercul */
.results-card.is-loading .risk-bar-wrap {
  opacity: 0;
  pointer-events: none;
}

/* dacă mai aveai și alte chestii aici, lasă doar risk-bar-wrap, nu și risk-score-row */


.results-card.is-loading .risk-text {
  opacity: 0.4;
  filter: blur(0.3px);
}

/* Putem păstra un mic puls pe indicator, chiar dacă e invizibil la început */
@keyframes riskPulse {
  from { transform: translate(-50%, -50%) scale(0.95); }
  to   { transform: translate(-50%, -50%) scale(1.05); }
}

.results-card.is-loading .risk-bar-indicator {
  animation: riskPulse 0.6s ease-in-out infinite alternate;
}


    /* Embed widget */

    .embed-widget {
      margin-top: 16px;
      padding: 12px 14px;
      border-radius: var(--radius-lg);
      background: rgba(15, 23, 42, 0.7);
      border: 1px solid rgba(148, 163, 184, 0.35);
      backdrop-filter: blur(14px);
    }

    .embed-title {
      margin: 0 0 6px;
      font-size: 0.9rem;
      font-weight: 600;
    }

    .embed-desc {
      margin: 0 0 10px;
      color: var(--text-muted);
      font-size: 0.75rem;
    }

    .embed-code {
      width: 100%;
      min-height: 100px;
      background: rgba(2, 6, 23, 0.9);
      color: #d1d5db;
      font-family: monospace;
      font-size: 0.72rem;
      border-radius: var(--radius-lg);
      border: 1px solid rgba(148, 163, 184, 0.35);
      padding: 8px;
      resize: none;
      outline: none;
      box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
      cursor: pointer;
    }

    .embed-code:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5);
    }

    footer {
      margin-top: 4px;
      padding: 8px 10px;
      font-size: 0.7rem;
      color: var(--text-muted);
      display: flex;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    footer a {
      color: #a5b4fc;
      text-decoration: none;
    }

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

    /* INFO / SEO CARD */

    .info-card {
      grid-column: 1 / -1;
      margin-top: 4px;
      background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9));
      border-radius: var(--radius-xl);
      padding: 16px 18px;
      border: 1px solid rgba(148, 163, 184, 0.35);
      box-shadow: var(--shadow-soft);
      backdrop-filter: blur(var(--glass-blur));
      position: relative;
      overflow: hidden;
    }

    .info-card::before {
      content: "";
      position: absolute;
      inset: -60%;
      background:
        radial-gradient(circle at 0 0, rgba(52, 211, 153, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.14), transparent 45%);
      opacity: 0.8;
      pointer-events: none;
      mix-blend-mode: screen;
    }

    .info-header {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
      flex-wrap: wrap;
    }

    .info-title {
      margin: 0 0 4px;
      font-size: 0.98rem;
      font-weight: 600;
    }

    .info-subtitle {
      margin: 0;
      font-size: 0.78rem;
      color: var(--text-muted);
      max-width: 520px;
    }

    .info-toggle {
      border-radius: var(--radius-pill);
      border: 1px solid rgba(148, 163, 184, 0.6);
      background: rgba(15, 23, 42, 0.9);
      color: var(--text-main);
      font-size: 0.75rem;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      cursor: pointer;
      white-space: nowrap;
      transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    }

    .info-toggle:hover {
      background: rgba(15, 23, 42, 0.95);
      border-color: var(--accent);
      box-shadow: 0 0 18px rgba(34, 197, 94, 0.45);
      transform: translateY(-0.5px);
    }

    .info-toggle-icon {
      font-size: 0.75rem;
      transform-origin: center;
      transition: transform var(--transition-med);
    }

    .info-toggle[aria-expanded="true"] .info-toggle-icon {
      transform: rotate(-180deg);
    }

    .info-body {
      position: relative;
      z-index: 1;
      max-height: 0;
      overflow: hidden;
      transition: max-height 260ms ease-out;
    }

    .info-body.expanded {
      max-height: 1200px;
    }

    .info-body-inner {
      padding-top: 8px;
      font-size: 0.8rem;
      color: #e5e7eb;
    }

    .info-body-inner h3 {
      margin: 10px 0 4px;
      font-size: 0.86rem;
    }

    .info-body-inner p {
      margin: 4px 0 6px;
    }

    .info-body-inner ul {
      margin: 4px 0 8px 16px;
      padding: 0;
    }

    .info-body-inner li {
      margin-bottom: 3px;
    }

    .info-note {
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .info-disclaimer {
      margin-top: 8px;
      font-size: 0.75rem;
      color: var(--text-muted);
      border-top: 1px solid rgba(148, 163, 184, 0.35);
      padding-top: 6px;
    }

    @media (max-width: 720px) {
      .info-card {
        padding: 14px 14px;
      }
      .info-title {
        font-size: 0.9rem;
      }
      .info-subtitle {
        font-size: 0.76rem;
      }
    }
/* ============================================
   TOP NAV (About, How it works, Contact, etc.)
   ============================================ */

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
}

.top-nav a {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.top-nav a:hover {
  border-color: var(--accent);
  background: rgba(22, 163, 74, 0.18);
  transform: translateY(-0.5px);
}

.top-nav a.active {
  border-color: var(--accent-strong);
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.28), rgba(15, 23, 42, 0.9));
  color: #bbf7d0;
}

/* ============================================
   PAGINI DE TIP ABOUT / HOW IT WORKS
   (folosite în about.html și viitoarele)
   ============================================ */

.page-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.lead {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 640px;
}

.pill-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.75rem;
  color: #bbf7d0;
  margin-bottom: 12px;
}

.pill-highlight span.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

/* grid principal text + side card (about, how-it-works) */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 16px;
  margin-top: 8px;
}

@media (max-width: 800px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.content-grid h2 {
  font-size: 1rem;
  margin: 10px 0 6px;
}

.content-grid p {
  font-size: 0.85rem;
  color: #e5e7eb;
  margin: 4px 0 8px;
}

.content-grid ul {
  font-size: 0.85rem;
  margin: 4px 0 10px 18px;
  color: #d1d5db;
}

.content-grid li {
  margin-bottom: 4px;
}

/* card lateral (Who is this for?, Data, etc.) */
.side-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  padding: 10px 12px;
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
}

.side-card h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.side-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* bullets cu punct verde pentru info lateral */
.bullet {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}

.bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.8);
  margin-top: 4px;
}

.bullet-text {
  font-size: 0.8rem;
  color: #e5e7eb;
}

/* bloc de disclaimer la finalul paginii (about, methodology) */
.disclaimer-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* opțional: secțiuni generice pe paginile text-heavy */
.about-section {
  margin-bottom: 18px;
}

.about-section h2 {
  font-size: 1rem;
  margin: 10px 0 6px;
}
/* Hide main page scrollbar but keep scrolling */
html, body {
  height: 100%;
  overflow-y: auto;
}

/* Chrome / Edge / Safari */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.app-shell::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  display: none;
}

/* Firefox */
html {
  scrollbar-width: none;
}

/* Old Edge / IE */
body {
  -ms-overflow-style: none;
}

.about-section p {
  margin: 4px 0 8px;
  font-size: 0.85rem;
  color: #e5e7eb;
}
/* Link styling for in-text links and "Continue learning" links */
a {
  color: var(--accent-strong);          /* verde intens */
  font-weight: 600;                     /* îngroșat */
  text-decoration: none;                /* fără underline */
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: #4ade80;                       /* verde și mai luminos */
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}
/* Big circular score meter */
.risk-score-circle {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  margin: 0 auto;
  margin-top: 6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;

  background: conic-gradient(
    from 0deg,
    #22c55e,
    #4ade80,
    #38bdf8,
    #a855f7,
    #22c55e
  );
  background-size: 200% 200%;
  animation: circleGlow 3.5s linear infinite;

  box-shadow: 0 0 25px rgba(34, 197, 94, 0.5), 
              0 0 40px rgba(59, 130, 246, 0.3);
}

@keyframes circleGlow {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

.risk-score-value-big {
  font-size: 3.2rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255,255,255,0.55);
}
/* Big circular SugarRisk index display */
.risk-score-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.risk-score-circle {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    from 0deg,
    #22c55e,
    #4ade80,
    #38bdf8,
    #a855f7,
    #22c55e
  );
  background-size: 200% 200%;
  animation: circleGlow 3.5s linear infinite;
  box-shadow:
    0 0 25px rgba(34, 197, 94, 0.5),
    0 0 40px rgba(59, 130, 246, 0.3);
}

.risk-score-circle-inner {
  width: 78%;
  height: 78%;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #0f172a, #020617 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.risk-score-value-big {
  font-size: 3.1rem;         /* dublu față de ce aveai înainte */
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.risk-score-percent-hint {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #9ca3af;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes circleGlow {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}
/* Spinner (clepsidră modernă) în interiorul cercului în timpul încărcării */
.risk-score-circle-inner {
  position: relative;
}
.results-card.is-loading .risk-score-circle-inner::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.4);  /* inel exterior */
  border-top-color: #22c55e;                   /* segment evidențiat */
  border-right-color: #38bdf8;
  border-bottom-color: rgba(148, 163, 184, 0.15);
  border-left-color: rgba(148, 163, 184, 0.15);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
  animation: spinCircle 0.9s linear infinite;
}

/* în timpul încărcării, cifra se estompează puțin ca să iasă în evidență clepsidra */
.results-card.is-loading .risk-score-value-big {
  opacity: 0.35;
}
/* ============================
   MOBILE LAYOUT (telefoane)
   ============================ */
@media (max-width: 720px) {
  /* Shell: mai puțin padding, spațiu jos pentru footer-bar */
  .app-shell {
    max-width: 100%;
    padding: 8px 8px 56px;
    gap: 10px;
  }

  /* Ascundem header-ul (logo + navigație) DOAR pe mobil */
  header {
    display: none;
  }

  /* Main devine coloană: întâi rezultatul, apoi formularul, apoi overview */
  main {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* Ordine pe mobil:
     1. results-card (dreapta pe desktop)
     2. card (formularul din stânga)
     3. info-card (Expand overview / SEO) */
  main > .results-card {
    order: 1;
  }

  main > .card {
    order: 2;
  }

  main > .info-card {
    order: 3;
  }

  /* Cardurile mai compacte pe mobil */
  .results-card,
  .card,
  .info-card {
    padding: 12px 14px 14px;
    border-radius: 18px;
  }

  /* Ascundem embed widget pe mobil – nu e util pe telefon */
  .embed-widget {
    display: none !important;
  }

  /* Opțional: mai puțin text “greu” jos în cardul de rezultate */
  .data-quality {
    font-size: 0.68rem;
  }

  /* FOOTER ca bară de navigație jos */
  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    font-size: 0.7rem;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: linear-gradient(to top, rgba(15,23,42,0.95), rgba(15,23,42,0.9));
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(14px);
    z-index: 20;
  }

  /* Ascundem textul de copyright pe mobil, păstrăm doar linkurile utile */
  footer span:first-child {
    display: none;
  }

  footer span:last-child {
    width: 100%;
    text-align: center;
  }

  footer a {
    font-weight: 500;
  }
}
/* === EMBED PAGE LIVE WIDGET === */

.embed-live-widget {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.embed-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.embed-header-link {
  font-size: 0.8rem;
  color: #a5b4fc;
  text-decoration: none;
  white-space: nowrap;
}

.embed-header-link:hover {
  text-decoration: underline;
}

.embed-result-panel {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.22), rgba(15, 23, 42, 0.95));
  padding: 10px 12px;
}

.embed-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.embed-result-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.embed-top-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.embed-top-main .risk-circle {
  width: 90px;
  height: 90px;
}

.embed-result-right {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.embed-result-help {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Cerc rotund + spinner – re-folosim conceptul de pe index */
.risk-circle {
  border-radius: 999px;
  border: 3px solid rgba(248, 250, 252, 0.95);
  background: radial-gradient(circle at 30% 0, #22c55e, #0f172a);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9), 0 0 26px rgba(34, 197, 94, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.risk-circle-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.risk-circle-unit {
  font-size: 0.8rem;
  margin-left: 2px;
}

.risk-circle-spinner {
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.3);
  border-top-color: #22c55e;
  border-right-color: #38bdf8;
  border-bottom-color: rgba(148, 163, 184, 0.12);
  border-left-color: rgba(148, 163, 184, 0.12);
  animation: spinCircle 0.85s linear infinite;
  opacity: 0;
  pointer-events: none;
}

.embed-live-widget.embed-loading .risk-circle-spinner {
  opacity: 1;
}

@keyframes spinCircle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.embed-form-panel {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.94);
  padding: 10px 12px 12px;
}

.embed-form-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}
/* Rating widget */
.rating-block {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, rgba(59,130,246,0.16), transparent 55%),
              rgba(15,23,42,0.85);
  border: 1px solid rgba(148,163,184,0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.rating-title {
  font-weight: 500;
  color: #e5e7eb;
}

.rating-stars {
  display: flex;
  gap: 4px;
}

.rating-star {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #4b5563; /* stea “goală” */
  transition: transform 0.1s ease, color 0.1s ease;
}

.rating-star.is-active {
  color: #facc15; /* stea plină */
}

.rating-star:hover {
  transform: scale(1.1);
}

.rating-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  gap: 4px;
  align-items: center;
}

.rating-thanks {
  font-size: 0.78rem;
  color: #a3e635;
}
/* Checkbox pills for blood sugar checker */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-pill input {
  width: 13px;
  height: 13px;
  accent-color: #22c55e;
}
.input-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.input-error-message {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}

.input-error-message.active {
  display: block;
}
/* centrare subtilă pentru textul de sub cerc */
.risk-score-percent-hint {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #9ca3af;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
}

/* erori pe input */
.input-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.input-error-message {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}

.input-error-message.active {
  display: block;
}

.select-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

/* Alertă roșie generică în cardurile de rezultate */
.error-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.55);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  color: #ef4444;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(2px);
}

.error-alert .error-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* Mesaj scurt de interpretare (prediabetes + blood sugar) */
.status-message {
  margin: 12px auto 8px auto;
  font-size: 0.95rem;
  font-weight: 600;
  display: none;
  text-align: center;
  max-width: 480px;
  line-height: 1.4;
}

.status-message.ok {
  color: #22c55e;
}

.status-message.warn {
  color: #f97316;
}

.status-message.danger {
  color: #ef4444;
}

/* Culori pentru valorile din cerc (scor & glicemie) */
.risk-value-ok {
  color: #22c55e !important;
}

.risk-value-borderline {
  color: #f97316 !important;
}

.risk-value-extreme {
  color: #ef4444 !important;
}
/* ---------------------------- */
/* RISK LOADER (WAITING SCREEN) */
/* ---------------------------- */

#riskLoader {
  display: none; /* activat din JS */
  margin-top: 6px;            /* aici e cheia – spațiu mult mai mic */
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 145, 0, 0.08);
  border: 1px solid rgba(255, 145, 0, 0.3);
  text-align: center;
  animation: fadeIn 0.4s ease;
}


#riskLoader .loader-icon {
  font-size: 28px;
  color: #ff8c00;
  margin-bottom: 6px;
}

#riskLoader .loader-text {
  font-weight: 600;
  color: #ff8c00;
  margin-bottom: 10px;
}

#riskLoader .loader-sub {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 14px;
}

/* BARA DE LOADING */
#riskLoader .loader-strip {
  width: 100%;
  height: 6px;
  background: rgba(255, 145, 0, 0.25);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

#riskLoader .loader-strip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: #ff8c00;
  border-radius: 6px;
  animation: slideBar 1.2s linear infinite;
}

/* Animații */
@keyframes slideBar {
  0% { left: -40%; }
  100% { left: 100%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ============================================
   INTERPRETAREA REZULTATULUI (sub bara gradata)
   ============================================ */

.risk-text {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #e5e7eb;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.88);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Icon + conținut în interiorul casetei */
.risk-text-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 2px;
}

.risk-text-body {
  flex: 1;
  text-align: left;
}

.risk-text-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.risk-text-note {
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.9;
  color: #9ca3af;
}

/* VARIANTE PE SEVERITATE */

/* scor mai scăzut – verde */
.risk-text--ok {
  border-color: rgba(34, 197, 94, 0.9);
  background: radial-gradient(circle at 0 0, rgba(22, 163, 74, 0.4), rgba(15, 23, 42, 0.95));
}
.risk-text--ok .risk-text-title {
  color: #bbf7d0;
}
.risk-text--ok .risk-text-icon {
  color: #4ade80;
}

/* scor moderat – portocaliu / galben */
.risk-text--moderate {
  border-color: rgba(249, 115, 22, 0.9);
  background: radial-gradient(circle at 0 0, rgba(251, 146, 60, 0.35), rgba(15, 23, 42, 0.96));
}
.risk-text--moderate .risk-text-title {
  color: #fed7aa;
}
.risk-text--moderate .risk-text-icon {
  color: #fdba74;
}

/* scor ridicat – roșu */
.risk-text--high {
  border-color: rgba(239, 68, 68, 0.95);
  background: radial-gradient(circle at 0 0, rgba(248, 113, 113, 0.4), rgba(15, 23, 42, 0.97));
}
.risk-text--high .risk-text-title {
  color: #fecaca;
}
.risk-text--high .risk-text-icon {
  color: #fca5a5;
}

/* în timpul loading-ului vrem ca mesajul să fie clar, nu blur */
.results-card.is-loading .risk-text {
  opacity: 1;
  filter: none;
  text-align: center;
  justify-content: center;
}
/* SHARE BLOCK */

.share-block {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 55%),
              rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.share-title {
  font-weight: 600;
  color: #e5e7eb;
}

.share-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.share-btn:hover {
  transform: translateY(-0.5px);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* Variante de culoare ușoare per rețea */
.share-btn.share-linkedin {
  border-color: rgba(37, 99, 235, 0.6);
}

.share-btn.share-reddit {
  border-color: rgba(248, 113, 113, 0.7);
}

.share-btn.share-x {
  border-color: rgba(148, 163, 184, 0.8);
}

.share-btn.share-facebook {
  border-color: rgba(59, 130, 246, 0.8);
}

.share-btn.share-whatsapp {
  border-color: rgba(34, 197, 94, 0.8);
}

.share-btn.share-copy {
  border-style: dashed;
}

.share-emoji {
  font-size: 1rem;
}

.share-feedback {
  margin-top: 4px;
  font-size: 0.76rem;
  color: #a3e635;
  min-height: 14px;
}
@media (max-width: 720px) {
  header {
    display: none;
  }
.rating-block,
  .share-block {
    display: none !important;
  }
  main {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  main > .results-card {
    order: 1;
  }

  main > .card {
    order: 2;
  }

  main > .info-card {
    order: 3;
  }

  .embed-widget {
    display: none !important;
  }

  .topics-strip {
    display: none !important;
  }
}
/* ============================================
   Prediabetes Risk Test (wizard)
   ============================================ */

.rt-page {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .rt-page {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rt-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.rt-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  font-size: 0.78rem;
}

/* Progress bar + dots */

.rt-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.rt-back-btn {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 0.8rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), opacity 0.15s ease;
}

.rt-back-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.rt-back-btn:not(:disabled):hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: var(--accent);
  transform: translateY(-0.5px);
}

.rt-progress {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rt-progress-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rt-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  overflow: hidden;
  position: relative;
}

.rt-progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #4ade80, #fbbf24, #fb7185);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.6);
  transition: width 260ms cubic-bezier(0.22, 0.68, 0, 1);
}

.rt-progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.rt-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.rt-progress-dot.is-active {
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.4), rgba(15, 23, 42, 1));
  border-color: rgba(34, 197, 94, 0.9);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
  transform: scale(1.1);
}

.rt-progress-dot.is-complete:not(.is-active) {
  background: rgba(34, 197, 94, 0.4);
  border-color: rgba(34, 197, 94, 0.7);
}

/* Steps wrapper + animatie de tranziție */

.rt-steps-wrapper {
  position: relative;
  height: auto;
  /* height-ul va fi setat din JS ca să nu se suprapună cu disclaimer-ul */
  transition: height 260ms cubic-bezier(0.22, 0.68, 0, 1);
}

.rt-step {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px) scale(0.98);
  transition:
    opacity 260ms var(--transition-med),
    transform 260ms var(--transition-med);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rt-step.is-current {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  z-index: 2;
}

.rt-step.is-prev {
  opacity: 0;
  transform: translateX(-35px) scale(0.98);
  z-index: 1;
}

.rt-step.is-next {
  opacity: 0;
  transform: translateX(35px) scale(0.98);
  z-index: 1;
}

.rt-step-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}

.rt-step-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rt-step-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fb923c; /* portocaliu cald */
  text-shadow: 0 0 10px rgba(251, 146, 60, 0.35);
}

.rt-step-text {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-main);
  max-width: 460px;
  padding: 10px 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(251, 146, 60, 0.25), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(251, 146, 60, 0.65);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 0 18px rgba(251, 146, 60, 0.45);
}


/* Option buttons */

.rt-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.rt-option {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.92);
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.85rem;
  color: var(--text-main);
  transition: border-color var(--transition-fast),
              background var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
}

.rt-option:hover {
  border-color: var(--accent);
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.96));
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.55);
  transform: translateY(-1px);
}

.rt-option.is-selected {
  border-color: rgba(34, 197, 94, 0.9);
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.38), rgba(15, 23, 42, 0.98));
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.7);
}

.rt-option-main {
  font-weight: 500;
}

.rt-option-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Note sub wizard */

.rt-note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  padding-top: 8px;
}

/* Rezultate – reusează vizual cercul + bara din stilul existent */

.rt-results-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rt-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.rt-results-title {
  margin: 0;
  font-size: 0.96rem;
}

/* Suprapunem culori pentru bandă */

#rtScoreValue.risk-value-ok {
  color: #22c55e;
}

#rtScoreValue.risk-value-borderline {
  color: #f97316;
}

#rtScoreValue.risk-value-extreme {
  color: #ef4444;
}

/* mic tweak la bara de risc – o lăsăm să folosească .risk-bar-* existente */

.rt-results-card .risk-bar-wrap {
  margin-top: 10px;
}

/* RESPONSIVE – pe mobil vrem mai mult spațiu vertical, ordinea rămâne wizard sus, rezultat jos */

@media (max-width: 720px) {
  .rt-page {
    display: flex;
    flex-direction: column;
  }

  .rt-card,
  .rt-results-card {
    padding: 12px 14px 14px;
  }

  .rt-steps-wrapper {
    min-height: 260px;
  }

  .rt-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

 .rt-card-meta {
  display: flex;
  flex-direction: row;          /* în loc de column */
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
  flex-wrap: wrap;              /* să se rupă frumos pe mobil */
  justify-content: flex-end;
}
}
@media (max-width: 640px) {
  .rt-card-meta {
    justify-content: flex-start;
  }
}
.rt-share-row {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rt-share-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rt-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rt-share-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.rt-share-btn:hover {
  border-color: #fb923c;
  background: radial-gradient(circle at 0 0, rgba(251, 146, 60, 0.26), rgba(15, 23, 42, 0.98));
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.55);
  transform: translateY(-0.5px);
}

.rt-share-feedback {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-height: 1em;
}
.rt-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rt-share-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  padding: 6px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.rt-share-btn:hover {
  border-color: #fb923c;
  background: radial-gradient(circle at 0 0, rgba(251, 146, 60, 0.26), rgba(15, 23, 42, 0.98));
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.55);
  transform: translateY(-0.5px);
}
.rt-question-display {
  text-align: center;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rt-question-display .rt-step-title {
  font-size: 1.35rem;
  color: #fb923c;
  text-shadow: 0 0 14px rgba(251,146,60,0.45);
  margin: 0;
}

.rt-question-display .rt-step-text {
  font-size: 0.9rem;
  color: var(--text-main);
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(251,146,60,0.18), transparent 60%),
    rgba(15,23,42,0.96);
  border: 1px solid rgba(251,146,60,0.65);
  box-shadow: 
    0 0 0 1px rgba(15,23,42,0.9),
    0 0 18px rgba(251,146,60,0.45);
}

.rt-question-display .rt-step-kicker {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* opţional: ascundem header-ul original din step-uri ca să nu fie dublu */
.rt-step-header {
  display: none;
}
.rt-reset-row {
  margin-top: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.rt-reset-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(251, 146, 60, 0.65);
  color: #fb923c;
  transition: all 0.25s ease;
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.35);
}

.rt-reset-btn:hover {
  background: radial-gradient(circle at 0 0, rgba(251,146,60,0.20), rgba(15,23,42,0.98));
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(251, 146, 60, 0.55);
}
