:root {
  color-scheme: light;
  --bg: #f6f0ef;
  --bg-deep: #f3e9e6;
  --ink: #2f2321;
  --muted: #6a5650;
  --rose: #d79aa5;
  --peach: #f4c6b1;
  --accent: #c16a7b;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --shadow: 0 24px 60px rgba(114, 74, 68, 0.2);
  --border: rgba(156, 118, 110, 0.2);
  --radius: 22px;
}

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

html,
body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff7f4 0%, var(--bg) 45%, #eadfdc 100%);
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  margin: 0 0 12px;
}

p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.65;
  animation: float 18s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(244, 198, 177, 0.6), transparent 70%);
  top: -120px;
  left: -60px;
}

.orb-2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(215, 154, 165, 0.55), transparent 70%);
  bottom: -160px;
  right: 10%;
  animation-delay: -6s;
}

.orb-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(248, 229, 221, 0.7), transparent 70%);
  top: 30%;
  right: -80px;
  animation-delay: -3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(18px) scale(1.03);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes smoothAppear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes dotPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow: hidden;
  overflow-x: hidden;
}

.hero {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 54px);
  margin-bottom: 12px;
}

.subhead {
  max-width: 520px;
  color: var(--muted);
}

.ghost-button {
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.ghost-button:hover {
  border-color: var(--accent);
}

.ghost-button:focus {
  outline: none;
}

.ghost-button:active {
  transform: scale(0.96);
}

.chat-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 24px;
  min-height: 0;
}

.primary-button {
  border: none;
  background: linear-gradient(135deg, #c16a7b, #e7a7b2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 30px rgba(193, 106, 123, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
}

.primary-button:hover {
  transform: translateY(-1px) scale(1.05);
}

.primary-button:active {
  transform: scale(0.95);
}

.primary-button:focus {
  outline: none;
}

.primary-button svg {
  display: block;
}

.switch {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.switch input {
  display: none;
}

.slider {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(193, 106, 123, 0.2);
  position: relative;
  transition: background 0.2s ease;
}

.slider::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 4px;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background: rgba(193, 106, 123, 0.6);
}

.switch input:checked + .slider::after {
  transform: translateX(18px);
}

.switch-label {
  grid-column: 2;
}

.chat {
  background: var(--panel-strong);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
  min-height: 0;
  overflow-x: hidden;
}

.chat-log {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  padding-bottom: 20px;
  display: grid;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

.chat-log::-webkit-scrollbar {
  width: 3px;
}

.chat-log::-webkit-scrollbar-track {
  background: rgba(193, 106, 123, 0.08);
  border-radius: 999px;
}

.chat-log::-webkit-scrollbar-thumb {
  background: rgba(193, 106, 123, 0.35);
  border-radius: 999px;
}

.chat-log::-webkit-scrollbar-thumb:hover {
  background: rgba(193, 106, 123, 0.55);
}

.message {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  animation: slideInLeft 0.6s ease-in-out;
}

.message.user {
  grid-template-columns: 1fr auto;
  animation: slideInRight 0.6s ease-in-out;
  margin-right: 8px;
}

.message.user .bubble {
  background: rgba(215, 154, 165, 0.2);
  color: var(--ink);
}

.message.user .avatar {
  order: 2;
  background: rgba(193, 106, 123, 0.16);
  color: var(--accent);
}

.choice-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  gap: 6px;
  flex-wrap: wrap;
  animation: fadeIn 0.7s ease-in-out;
  margin-top: -6px;
  padding: 6px 16px 8px 16px;
  margin-left: 0;
}

.choice-row::-webkit-scrollbar {
  display: none;
}

.choice-grid {
  display: contents;
}

.choice-button {
  border: 1px solid rgba(193, 106, 123, 0.4);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 208, 200, 0.7));
  color: var(--ink);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(193, 106, 123, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border 0.18s ease, background 0.18s ease;
  min-width: auto;
  text-align: center;
  white-space: nowrap;
  height: 32px;
  animation: fadeIn 0.5s ease-in-out backwards;
  outline: none;
}

.choice-button:focus {
  outline: none;
}

.choice-button:active {
  transform: scale(0.98);
}

.choice-button:nth-child(1) { animation-delay: 0.15s; }
.choice-button:nth-child(2) { animation-delay: 0.25s; }
.choice-button:nth-child(3) { animation-delay: 0.35s; }
.choice-button:nth-child(4) { animation-delay: 0.45s; }
.choice-button:nth-child(5) { animation-delay: 0.55s; }
.choice-button:nth-child(6) { animation-delay: 0.65s; }

.choice-button:hover {
  border-color: rgba(193, 106, 123, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(193, 106, 123, 0.25);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(193, 106, 123, 0.15);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
  overflow: hidden;
}

.avatar img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.bubble {
  background: #fff;
  border-radius: 28px;
  padding: 14px 16px;
  line-height: 1.6;
  box-shadow: 0 10px 24px rgba(114, 74, 68, 0.1);
  font-size: 14.5px;
  max-width: 60%;
  white-space: pre-line;
  word-break: break-word;
}

.bubble:has(.photo-dialog) {
  border-radius: 24px;
  padding: 16px;
  max-width: 70%;
}

.bubble.typing-indicator {
  width: fit-content;
  max-width: none;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: dotPulse 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

.message.user {
  justify-items: end;
}

.message.user .bubble {
  justify-self: end;
  max-width: 45%;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 10px;
  align-items: center;
}

.composer textarea {
  resize: none;
  border-radius: 98px;
  padding: 12px 14px;
  padding-left: 60px;
  padding-right: 26px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  overflow: hidden;
  outline: none;
  transition: border-color 0.2s ease;
}

.composer textarea:focus {
  outline: none;
  border-color: rgba(193, 106, 123, 0.5);
}

.composer-input {
  display: grid;
  gap: 10px;
  position: relative;
}

.toggle-search-button {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(114, 74, 68, 0.15);
  outline: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.toggle-search-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.05);
}

.toggle-search-button:focus {
  outline: none;
}

.toggle-search-button:active {
  transform: translateY(-50%) scale(0.95);
}

.composer-toggle {
  position: absolute;
  left: 52px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(114, 74, 68, 0.12);
}

.composer-toggle.visible {
  display: flex;
}

.composer-toggle .switch {
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.photo-dialog {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.photo-dialog p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-dialog .ghost-button {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
}

.file-input-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 960px) {
  .hero {
    flex-direction: column;
  }

  .composer {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 768px) {
  .app {
    padding: 20px 16px;
    gap: 20px;
  }

  .hero-card {
    display: none;
  }

  .hero {
    margin-bottom: 0;
  }

  .hero > div {
    text-align: center;
  }

  .dashboard-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    z-index: 2;
  }

  .hero h1 {
    font-size: clamp(32px, 8vw, 42px);
    margin-bottom: 8px;
  }

  .subhead {
    display: none;
  }

  .eyebrow {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .chat-shell {
    flex: 1;
    min-height: 0;
  }

  .composer textarea {
    font-size: 13px;
  }

  .bubble {
    max-width: 75%;
    font-size: 14px;
  }

  .bubble:has(.photo-dialog) {
    max-width: 85%;
  }

  .message.user .bubble {
    max-width: 70%;
  }
}

@media (max-width: 600px) {
  .chat {
    padding: 16px;
  }

  .composer-toggle {
    left: 26px;
  }

  .composer textarea {
    padding-left: 48px;
    /* Предотвращение автоматического зума при фокусе (16px минимум) */
    font-size: 16px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .choice-button {
    min-width: auto;
    font-size: 11px;
    padding: 5px 10px;
    height: 30px;
  }
}

/* Мобильные стили для лучшей адаптации при открытии клавиатуры */
@media (max-height: 600px) and (max-width: 768px), (max-width: 768px) and (max-height: 500px) {
  /* Уменьшить отступы для экономии места */
  .app {
    padding: 12px 12px;
    gap: 12px;
    height: 100dvh;
  }

  .hero {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .hero h1 {
    font-size: 24px;
    margin-bottom: 4px;
  }

  .eyebrow {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .subhead {
    display: none;
  }

  .chat {
    padding: 12px;
    gap: 12px;
    border-radius: 16px;
  }

  .chat-log {
    padding-right: 4px;
    padding-bottom: 12px;
    gap: 12px;
  }

  .composer {
    margin-top: 8px;
    gap: 8px;
  }

  .bubble {
    padding: 10px 12px;
    font-size: 13px;
    max-width: 70%;
  }

  .message.user .bubble {
    max-width: 65%;
  }

  .message {
    gap: 8px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .choice-button {
    padding: 6px 12px;
    font-size: 11px;
    min-width: 100px;
    height: 32px;
  }

  .primary-button {
    width: 40px;
    height: 40px;
  }

  .primary-button svg {
    width: 18px;
    height: 18px;
  }

  .toggle-search-button {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}

/* Предотвращение зума браузером на мобильных устройствах */
@media (max-width: 768px) {
  .composer textarea {
    /* Убедиться что font-size >= 16px для предотвращения зума */
    font-size: 16px;
  }

  .composer textarea:focus {
    outline: none;
    border-color: rgba(193, 106, 123, 0.5);
    /* Предотвращение смещения при фокусе */
    font-size: 16px;
  }

  /* Отключить неадекватный зум при фокусе на inputs */
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

/* Language Modal Styles */
.language-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.language-modal-content {
  background: var(--panel-strong);
  border-radius: var(--radius);
  padding: 32px 24px;
  max-width: 450px;
  width: 90%;
  box-shadow: var(--shadow);
  text-align: center;
  animation: slideUp 0.3s ease-out;
}

.language-modal-title {
  font-family: "Playfair Display", serif;
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--ink);
}

.language-modal-description {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.5;
}

.language-modal-content h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

.language-modal-content p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 15px;
}

.language-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.language-button {
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(193, 106, 123, 0.1);
  color: var(--ink);
  font-family: "Manrope", system-ui;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.language-button:hover {
  background: rgba(193, 106, 123, 0.2);
  border-color: var(--accent);
}

.language-button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

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

/* Dashboard Button */
.dashboard-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.dashboard-button:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(193, 106, 123, 0.15);
}

.dashboard-button:active {
  transform: scale(0.95);
}

.dashboard-button svg {
  width: 24px;
  height: 24px;
}

/* Dashboard Modal */
.dashboard-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: slideUpModal 0.4s ease-out;
  padding: 20px;
}

.dashboard-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.dashboard-modal-content {
  position: relative;
  background: var(--panel-strong);
  border-radius: 24px;
  width: 100%;
  max-width: 1200px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  z-index: 1001;
  overflow: hidden;
}

.dashboard-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(193, 106, 123, 0.1);
  color: var(--ink);
  font-size: 24px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 100;
  outline: none;
  padding: 0;
  line-height: 1;
}

.dashboard-modal-close:hover {
  background: rgba(193, 106, 123, 0.2);
  transform: scale(1.1);
}

.dashboard-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  position: relative;
  background: var(--panel-strong);
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.dashboard-header-content {
  flex: 1;
}

.dashboard-title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-header h2 {
  font-size: 26px;
  margin: 0 0 6px;
  color: var(--ink);
}

.dashboard-subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}

.reset-app-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  flex-shrink: 0;
  padding: 0;
}

.reset-app-btn:hover {
  background: rgba(255, 100, 100, 0.15);
  border-color: #e74c3c;
  color: #e74c3c;
  transform: scale(1.1);
}

.reset-app-btn:active {
  transform: scale(0.95);
}

/* Tooltip for reset button */
.reset-app-btn[data-tooltip] {
  position: relative;
}

.reset-app-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  margin-left: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.reset-app-btn[data-tooltip]::before {
  content: '';
  position: absolute;
  left: calc(100% - 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right-color: var(--ink);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.reset-app-btn[data-tooltip]:hover::after,
.reset-app-btn[data-tooltip]:hover::before {
  opacity: 1;
}

/* Test Reminder Container */
.test-reminder-container {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.test-reminder-content {
  text-align: center;
  background: linear-gradient(135deg, rgba(244, 198, 177, 0.15), rgba(215, 154, 165, 0.1));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
}

.test-reminder-text {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
}

.dashboard-body {
  padding: 24px 32px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  flex: 1;
  overflow: hidden;
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 1;
  overflow: hidden;
}

.dashboard-section h3 {
  font-size: 16px;
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  flex-shrink: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.section-header h3 {
  margin: 0;
}

.skin-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.profile-card {
  background: linear-gradient(135deg, rgba(244, 198, 177, 0.15), rgba(215, 154, 165, 0.1));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  transition: all 0.2s ease;
}

.profile-card:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(244, 198, 177, 0.25), rgba(215, 154, 165, 0.2));
  transform: translateY(-2px);
}

.profile-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.profile-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  font-family: "Playfair Display", serif;
}

.profile-value-text {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}

.recommendations-list,
.products-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 100px;
  padding-right: 4px;
}

.recommendations-section {
  position: relative;
}

.recommendations-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  z-index: 2;
}

.recommendations-list::-webkit-scrollbar,
.products-list::-webkit-scrollbar {
  width: 3px;
}

.recommendations-list::-webkit-scrollbar-track,
.products-list::-webkit-scrollbar-track {
  background: rgba(193, 106, 123, 0.08);
  border-radius: 999px;
}

.recommendations-list::-webkit-scrollbar-thumb,
.products-list::-webkit-scrollbar-thumb {
  background: rgba(193, 106, 123, 0.35);
  border-radius: 999px;
}

.recommendations-list::-webkit-scrollbar-thumb:hover,
.products-list::-webkit-scrollbar-thumb:hover {
  background: rgba(193, 106, 123, 0.55);
}

.empty-message {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px 16px;
  background: rgba(193, 106, 123, 0.08);
  border-radius: 12px;
  margin: 0;
}

.recommendation-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(248, 229, 221, 0.4));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.recommendation-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(193, 106, 123, 0.1);
}

.recommendation-card h4 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 15px;
}

.recommendation-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

.product-card {
  background: linear-gradient(135deg, rgba(215, 154, 165, 0.1), rgba(244, 198, 177, 0.1));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.product-card:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(215, 154, 165, 0.2), rgba(244, 198, 177, 0.15));
}

.product-info {
  flex: 1;
}

.product-name {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  font-size: 14px;
}

.product-category {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  width: 100%;
  gap: 8px;
}

.product-header > div {
  flex: 1;
}

.product-compatibility {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  margin: 4px 0 0;
}

.delete-product-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: rgba(193, 106, 123, 0.4);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.delete-product-btn:hover {
  background: rgba(193, 106, 123, 0.1);
  color: var(--accent);
}

.delete-product-btn:active {
  transform: scale(0.9);
}

.product-rating {
  display: flex;
  gap: 4px;
  align-items: center;
}

.rating-star {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
  background: rgba(255, 255, 255, 0.5);
}

.rating-star:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.rating-star.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.chart-container {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(248, 229, 221, 0.3));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  min-height: 180px;
  max-height: 240px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  scrollbar-width: none;
}

.chart-container::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.add-product-btn {
  background: linear-gradient(135deg, var(--accent), #e7a7b2);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.add-product-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(193, 106, 123, 0.25);
}

.add-product-btn:active {
  transform: scale(0.98);
}

/* Add Product Modal - Method Selection */
.add-product-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.add-product-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.add-product-modal-content {
  position: relative;
  background: var(--panel-strong);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow);
  z-index: 1003;
  animation: slideUp 0.3s ease;
}

.add-product-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.add-product-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: var(--ink);
}

.add-product-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.add-product-modal-close:hover {
  background: rgba(193, 106, 123, 0.1);
  color: var(--accent);
}

.add-product-modal-subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.add-product-method-buttons {
  display: flex;
  gap: 12px;
  flex-direction: column;
}

.add-product-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(248, 229, 221, 0.3), rgba(215, 154, 165, 0.15));
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}

.add-product-method-btn:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(248, 229, 221, 0.5), rgba(215, 154, 165, 0.25));
  transform: translateY(-2px);
}

.add-product-method-btn:active {
  transform: translateY(0);
}

.method-icon {
  font-size: 32px;
}

.method-label {
  font-weight: 600;
  font-size: 16px;
}

.method-desc {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* Add Product Form - Text Method Modal */
.add-product-form {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.add-product-form-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.add-product-form-content {
  position: relative;
  background: var(--panel-strong);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow);
  z-index: 1003;
  animation: slideUp 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.add-product-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.add-product-form-header h4 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

.add-product-form-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.add-product-form-close:hover {
  background: rgba(193, 106, 123, 0.1);
  color: var(--accent);
}

.add-product-form-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Product Recognition Loading */
.product-recognition-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel-strong);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  z-index: 2000;
  text-align: center;
  min-width: 200px;
}

.product-recognition-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

.product-recognition-loading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Product Recognition Success */
.product-recognition-success {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, rgba(168, 214, 156, 0.9), rgba(140, 190, 120, 0.9));
  border-radius: 12px;
  padding: 16px 24px;
  color: white;
  z-index: 2000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: slideInUp 0.3s ease;
}

.product-recognition-success p {
  margin: 0;
  font-weight: 600;
}

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

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

.form-input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 4px 12px rgba(193, 106, 123, 0.1);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn-primary-small {
  flex: 1;
  background: linear-gradient(135deg, var(--accent), #e7a7b2);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn-primary-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(193, 106, 123, 0.2);
}

.btn-secondary-small {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn-secondary-small:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Reset Confirmation Modal */
.reset-confirm-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  animation: slideUpModal 0.3s ease-out;
  padding: 20px;
}

.reset-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.reset-confirm-content {
  position: relative;
  background: var(--panel-strong);
  border-radius: 20px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  z-index: 1003;
}

.reset-confirm-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}

.reset-confirm-content p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

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

.btn-reset-confirm-danger {
  flex: 1;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn-reset-confirm-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.btn-reset-confirm-danger:active {
  transform: scale(0.98);
}

.btn-reset-confirm-cancel {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn-reset-confirm-cancel:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(193, 106, 123, 0.05);
}

.btn-reset-confirm-cancel:active {
  transform: scale(0.98);
}

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

/* Dashboard Responsive */
@media (max-width: 900px) {
  .dashboard-modal {
    padding: 16px;
  }

  .dashboard-modal-content {
    border-radius: 20px;
  }

  .dashboard-body {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 28px;
  }

  .dashboard-header {
    padding: 20px 24px;
  }

  .dashboard-header h2 {
    font-size: 22px;
  }
}

@media (max-width: 600px) {
  .dashboard-modal {
    padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
    align-items: stretch;
  }

  .dashboard-modal-content {
    border-radius: 20px 20px 0 0;
    max-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-body {
    flex: 0 0 auto;
    min-height: 0;
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    gap: 24px;
    overflow: visible;
  }

  .recommendations-list,
  .products-list {
    overflow: visible;
    max-height: none;
  }

  .dashboard-header {
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--panel-strong);
  }

  .dashboard-header h2 {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .dashboard-subtitle {
    font-size: 12px;
  }

  .dashboard-section h3 {
    font-size: 16px;
  }

  .dashboard-section {
    min-height: 260px;
  }

  .skin-profile-grid {
    grid-template-columns: 1fr 1fr;
  }

  .profile-card {
    padding: 12px;
  }

  .profile-value {
    font-size: 16px;
  }

  .profile-label {
    font-size: 10px;
  }

  .product-card {
    padding: 12px;
  }

  .chart-container {
    min-height: 200px;
  }

  .add-product-form {
    padding: 16px;
  }
}

.creator-footer {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 10;
}

.creator-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.creator-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(193, 106, 123, 0.08);
}

@media (max-width: 768px) {
  .language-modal-content {
    padding: 24px 16px;
    max-width: 90vw;
  }

  .language-modal-title {
    font-size: 28px;
    margin-bottom: 6px;
  }

  .language-modal-description {
    margin: 0 0 20px;
    font-size: 13px;
  }

  .language-modal-content h2 {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .language-modal-content p {
    margin-bottom: 18px;
    font-size: 14px;
  }

  .language-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .language-button {
    padding: 8px 10px;
    font-size: 12px;
  }

  .creator-footer {
    bottom: 16px;
    right: 0px;
  }

  .creator-link {
    font-size: 11px;
    padding: 8px 0px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: block;
    white-space: nowrap;
    right: 0;
  }
}
