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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
  height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Аутентификация */
.auth-screen {
  padding: 40px 30px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h1 {
  color: #667eea;
  font-size: 28px;
  margin-bottom: 10px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 15px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  border-bottom: 3px solid transparent;
}

.tab-btn.active {
  border-bottom-color: #667eea;
  color: #667eea;
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: #555;
  font-size: 14px;
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-primary {
  background: #667eea;
  color: white;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #5a67d8;
}

.error-message {
  background: #fee;
  color: #c53030;
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  border: 1px solid #feb2b2;
  font-size: 14px;
}

/* Основной интерфейс */
.main-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 5px;
}

.header p {
  font-size: 14px;
  opacity: 0.9;
}

.header-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.3s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.content-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Чат */
.chat-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: calc(100% - 120px);
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.4;
  animation: fadeIn 0.3s ease-in;
}

.user-message {
  align-self: flex-end;
  background: #667eea;
  color: white;
  border-bottom-right-radius: 5px;
}

.ai-message {
  align-self: flex-start;
  background: #f1f3f4;
  color: #333;
  border-bottom-left-radius: 5px;
}

.typing-indicator {
  align-self: flex-start;
  background: #f1f3f4;
  padding: 12px 16px;
  border-radius: 18px;
  border-bottom-left-radius: 5px;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.input-container {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.input-wrapper {
  display: flex;
  gap: 10px;
}

#user-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

#user-input:focus {
  border-color: #667eea;
}

#send-button {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

#send-button:hover:not(:disabled) {
  background: #5a67d8;
}

#send-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.onboarding-complete {
  background: #48bb78 !important;
}

/* Поиск партнеров */
.matches-container {
  padding: 20px;
  overflow-y: auto;
}

.matches-container h2 {
  color: #667eea;
  margin-bottom: 20px;
  text-align: center;
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.match-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.match-name {
  font-weight: 600;
  color: #2d3748;
}

.match-score {
  background: #667eea;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.match-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.interest-tag {
  background: #e9ecef;
  color: #4a5568;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 11px;
}

/* Модальные окна */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  color: #667eea;
  margin: 0;
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
}

.close:hover {
  color: black;
}

.modal-body {
  padding: 20px;
}
.profile-section {
  margin-bottom: 20px;
}

.profile-section h3 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 16px;
}

.profile-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  margin-top: 5px;
}

.profile-info div {
  margin-bottom: 8px;
}

.profile-info h4 {
  color: #2d3748;
  margin-bottom: 8px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.profile-tag {
  background: #667eea;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  background: #e9ecef;
  border-radius: 10px;
  margin: 10px 0;
  height: 10px;
}

.progress-fill {
  height: 100%;
  background: #48bb78;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.hidden {
  display: none !important;
}

.chat-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: calc(100% - 120px);
}

/* Убедитесь, что контейнер чата может скроллиться */
.content-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Улучшим скроллбар */
.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

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

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

@media (max-width: 600px) {
  .container {
    height: 100vh;
    border-radius: 0;
  }
  body {
    padding: 0;
  }
}

.profile-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.profile-tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.profile-tab-btn.active {
  border-bottom-color: #667eea;
  color: #667eea;
  font-weight: 600;
}

.profile-tab-btn:hover {
  background: #f8f9fa;
}

.profile-tab-content {
  min-height: 300px;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #718096;
}

/* Стили для анкеты самопознания */
.questionnaire-container {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
}

.questionnaire-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.questionnaire-header h2 {
  color: #667eea;
  margin-bottom: 10px;
}

.questionnaire-question {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
}

.question-text {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 15px;
  line-height: 1.5;
}

.question-category {
  color: #667eea;
  font-size: 14px;
  margin-bottom: 20px;
  font-weight: 500;
  background: #e6e9ff;
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-block;
}

.answer-section {
  margin: 25px 0;
}

#questionnaire-answer {
  width: 100%;
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

#questionnaire-answer:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.questionnaire-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.questionnaire-tips {
  margin-top: 25px;
  padding: 15px;
  background: #e8f4fd;
  border-radius: 8px;
  color: #2c5282;
  font-size: 14px;
  line-height: 1.5;
}

.questionnaire-tips p {
  margin: 0;
}

.questionnaire-loading {
  text-align: center;
  padding: 60px 20px;
}

.questionnaire-completion {
  text-align: center;
  padding: 40px 20px;
}

.completion-header {
  margin-bottom: 30px;
}

.completion-header h2 {
  color: #48bb78;
  margin-bottom: 15px;
}

.completion-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
}

.completion-info {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
}

.completion-info p {
  font-weight: 600;
  margin-bottom: 10px;
}

.completion-info ul {
  padding-left: 20px;
}

.completion-info li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.questionnaire-error {
  text-align: center;
  padding: 60px 20px;
  color: #e53e3e;
}

/* Стили для портрета */
.values-container,
.styles-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.value-tag,
.style-tag {
  background: #667eea;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.patterns-list,
.recommendations-list {
  margin-top: 10px;
  padding-left: 20px;
}

.patterns-list li,
.recommendations-list li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.trait-item {
  margin-bottom: 15px;
}

.trait-name {
  font-weight: 500;
  margin-bottom: 5px;
}

.trait-value {
  text-align: right;
  font-size: 12px;
  color: #718096;
}

.trait-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
}

.trait-fill {
  height: 100%;
  background: #667eea;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.portrait-section {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e2e8f0;
}

.portrait-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.portrait-section h4 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 16px;
}

/* Стили для расширенного профиля */
.profile-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  overflow-x: auto;
}

.profile-tab-btn {
  flex: none;
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.profile-tab-btn.active {
  border-bottom-color: #667eea;
  color: #667eea;
  font-weight: 600;
}

.profile-tab-btn:hover {
  background: #f8f9fa;
}

.profile-tab-content {
  min-height: 400px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Стили для портрета */
.portrait-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.portrait-stats {
  display: flex;
  gap: 20px;
  margin: 15px 0;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #667eea;
}

.stat-label {
  font-size: 12px;
  color: #718096;
  margin-top: 5px;
}

.portrait-update {
  font-size: 12px;
  color: #a0aec0;
  margin-top: 10px;
}

.big-five-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.big-five-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.trait-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.trait-name {
  font-weight: 600;
  color: #2d3748;
}

.trait-score {
  background: #667eea;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.trait-desc {
  font-size: 13px;
  color: #4a5568;
  margin-top: 8px;
  line-height: 1.4;
}

.trait-tip {
  background: #e8f4fd;
  border-left: 3px solid #4299e1;
  padding: 8px;
  margin-top: 8px;
  font-size: 12px;
  border-radius: 4px;
}

.values-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.value-card {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 15px;
  border-radius: 8px;
  transition: transform 0.2s;
}

.value-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.value-name {
  font-weight: 600;
  color: #667eea;
  margin-bottom: 5px;
}

.value-desc {
  font-size: 13px;
  color: #718096;
  line-height: 1.4;
}

.communication-styles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.style-card {
  background: #f7fafc;
  border: 1px solid #cbd5e0;
  padding: 12px 15px;
  border-radius: 8px;
  flex: 1;
  min-width: 150px;
}

.style-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 5px;
}

.style-tip {
  font-size: 12px;
  color: #718096;
  line-height: 1.4;
}

.portrait-footer {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

/* Стили для истории анкеты */
.questionnaire-history-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.history-stats {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 14px;
  color: #718096;
}

.questionnaire-answers {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 10px;
}

.answer-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  border-left: 4px solid #48bb78;
}

.answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: #718096;
}

.answer-number {
  background: #667eea;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.answer-category {
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 12px;
}

.answer-question {
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.4;
}

.answer-content {
  background: white;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  border: 1px solid #e2e8f0;
  line-height: 1.5;
}

.answer-analysis {
  background: #edf2f7;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e0;
}

.analysis-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #2d3748;
}

.analysis-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.analysis-score {
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
}

.analysis-values {
  font-size: 13px;
  color: #4a5568;
}

.history-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Стили для совместимости */
.compatibility-header {
  text-align: center;
  margin-bottom: 25px;
}

.compatibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.compatibility-card {
  background: #fffaf0;
  border: 1px solid #fed7d7;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #f56565;
}

.tip-number {
  display: inline-block;
  background: #f56565;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.tip-content {
  font-size: 14px;
  line-height: 1.5;
}

.compatibility-ideal {
  background: #ebf8ff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #bee3f8;
}

.compatibility-ideal h5 {
  color: #2c5282;
  margin-bottom: 10px;
}

.compatibility-ideal ul {
  padding-left: 20px;
  margin: 0;
}

.compatibility-ideal li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.compatibility-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
}

.empty-history h4 {
  margin-bottom: 15px;
  color: #667eea;
}

.empty-history p {
  margin-bottom: 10px;
  color: #718096;
}
/* Онбординг */
.onboarding-screen {
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.onboarding-step {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.onboarding-header {
  text-align: center;
  margin-bottom: 30px;
}

.welcome-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.onboarding-header h1 {
  color: #667eea;
  font-size: 24px;
  margin-bottom: 8px;
}

.subtitle {
  color: #718096;
  font-size: 16px;
  line-height: 1.4;
}

.onboarding-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 0 10px;
}

.onboarding-footer {
  padding: 20px 0;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.btn-secondary {
  background: #e9ecef;
  color: #4a5568;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

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

/* Прогресс бар */
.onboarding-progress {
  padding: 15px 0;
  margin-bottom: 20px;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9ecef;
  color: #a0aec0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all 0.3s;
}

.progress-step.active .step-number {
  background: #667eea;
  color: white;
}

.progress-step.completed .step-number {
  background: #48bb78;
  color: white;
}

.step-label {
  font-size: 12px;
  color: #a0aec0;
  text-align: center;
  transition: all 0.3s;
}

.progress-step.active .step-label {
  color: #667eea;
  font-weight: 500;
}

.progress-line {
  flex: 1;
  height: 2px;
  background: #e9ecef;
  margin: 0 10px;
  max-width: 60px;
}

/* Стили для специфичных элементов онбординга */
.date-selector {
  display: flex;
  gap: 10px;
}

.date-selector select {
  flex: 1;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  cursor: pointer;
}

.gender-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

.gender-btn {
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gender-btn:hover {
  border-color: #cbd5e0;
}

.gender-btn.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.photo-upload-area {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.photo-placeholder {
  aspect-ratio: 1;
  border: 2px dashed #cbd5e0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #f8f9fa;
}

.photo-placeholder:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.photo-icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: #a0aec0;
}

.photo-text {
  font-size: 12px;
  color: #718096;
  text-align: center;
}

.uploaded-photo {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.uploaded-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-photo {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

.social-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon {
  font-size: 20px;
  min-width: 30px;
  text-align: center;
}

.social-input input {
  flex: 1;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.purpose-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.purpose-btn {
  padding: 20px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.purpose-btn:hover {
  border-color: #cbd5e0;
  transform: translateY(-2px);
}

.purpose-btn.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  box-shadow: 0 4px 6px rgba(102, 126, 234, 0.1);
}

.purpose-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.purpose-text {
  font-weight: 600;
  margin-bottom: 5px;
  color: #2d3748;
}

.purpose-desc {
  font-size: 12px;
  color: #718096;
  line-height: 1.4;
}

.custom-purpose-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.input-hint {
  font-size: 12px;
  color: #a0aec0;
  margin-top: 5px;
  line-height: 1.4;
}

/* Стили для кнопок в основном интерфейсе */
.chat-interface {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.chat-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #667eea;
}

.chat-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.chat-info p {
  font-size: 12px;
  opacity: 0.9;
  margin: 0;
}

.chat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.4;
  position: relative;
}

.message-user {
  align-self: flex-end;
  background: #667eea;
  color: white;
  border-bottom-right-radius: 5px;
}

.message-ai {
  align-self: flex-start;
  background: #f1f3f4;
  color: #333;
  border-bottom-left-radius: 5px;
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 5px;
  text-align: right;
}

.chat-input-area {
  padding: 15px;
  border-top: 1px solid #e9ecef;
  background: white;
}

.chat-input-wrapper {
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
}

.chat-input:focus {
  border-color: #667eea;
}

.chat-send-btn {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.chat-send-btn:hover:not(:disabled) {
  background: #5a67d8;
}

.chat-send-btn:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
}

/* Боттом бар для навигации */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  background: white;
  border-top: 1px solid #e9ecef;
  position: sticky;
  bottom: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 8px 16px;
  transition: all 0.3s;
  flex: 1;
}

.nav-item.active {
  color: #667eea;
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
}

/* Адаптивные стили */
@media (max-width: 480px) {
  .onboarding-content {
    padding: 0 5px;
  }

  .gender-selector {
    grid-template-columns: 1fr;
  }

  .purpose-selector {
    grid-template-columns: 1fr;
  }

  .date-selector {
    flex-direction: column;
  }
}

/* Онбординг экран - исправление overflow */
.onboarding-screen {
  padding: 20px 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Важно: скрываем overflow у родителя */
}

.onboarding-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Важно для правильной работы flex */
}

.onboarding-header {
  text-align: center;
  margin-bottom: 20px;
  flex-shrink: 0; /* Запрещаем сжатие */
}

.onboarding-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 5px;
  overflow-y: auto; /* Добавляем скролл только для контента */
  max-height: calc(100% - 180px); /* Ограничиваем высоту */
  min-height: 300px; /* Минимальная высота */
}

.onboarding-footer {
  padding: 20px 0;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-shrink: 0; /* Запрещаем сжатие футера */
  background: white; /* Фон чтобы контент не наезжал */
  position: relative;
  z-index: 1;
}

/* Улучшения для скроллбара в контенте */
.onboarding-content::-webkit-scrollbar {
  width: 6px;
}

.onboarding-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.onboarding-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.onboarding-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Улучшения для загрузки фото */
.photo-upload-area {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 5px;
}

/* Улучшения для выбора цели */
.purpose-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 5px;
}

/* Улучшения для социальных сетей */
.social-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 150px;
  overflow-y: auto;
  padding: 5px;
}

/* Улучшения для текстовых областей */
.custom-purpose-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  min-height: 80px;
  max-height: 150px;
}

/* Улучшения для контейнера в целом */
.container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
  height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Важно */
  position: relative;
}

/* Медиа-запросы для мобильных устройств */
@media (max-height: 700px) {
  .container {
    height: 100vh;
    border-radius: 0;
  }

  .onboarding-content {
    max-height: calc(100vh - 250px);
  }
}

@media (max-width: 600px) {
  .container {
    height: 100vh;
    border-radius: 0;
  }

  .onboarding-screen {
    padding: 15px 20px;
  }

  .onboarding-content {
    max-height: calc(100vh - 220px);
    gap: 15px;
  }

  .purpose-selector {
    grid-template-columns: 1fr;
    max-height: 250px;
  }
}

/* Улучшенные стили для чата */
.chat-interface {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 0; /* Важно для flex overflow */
  max-height: calc(100vh - 200px); /* Ограничение высоты */
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.chat-input-area {
  padding: 15px 20px;
  border-top: 1px solid #e9ecef;
  background: white;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.chat-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
  min-height: 44px;
  max-height: 100px;
  resize: none;
  font-family: inherit;
}

.chat-input:focus {
  border-color: #667eea;
}

.chat-send-btn {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
  flex-shrink: 0;
  min-width: 80px;
}

.chat-send-btn:hover:not(:disabled) {
  background: #5a67d8;
}

.chat-send-btn:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
}

.message-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.4;
  position: relative;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease-in;
}

.message-user {
  align-self: flex-end;
  background: #667eea;
  color: white;
  border-bottom-right-radius: 5px;
}

.message-ai {
  align-self: flex-start;
  background: #f1f3f4;
  color: #333;
  border-bottom-left-radius: 5px;
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 5px;
  text-align: right;
}

.typing-indicator {
  background: #f1f3f4;
  padding: 12px 16px;
  border-radius: 18px;
  border-bottom-left-radius: 5px;
  align-self: flex-start;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Боттом бар */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  background: white;
  border-top: 1px solid #e9ecef;
  position: sticky;
  bottom: 0;
  z-index: 10;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.3s;
  flex: 1;
  min-width: 0;
}

.nav-item.active {
  color: #667eea;
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Адаптивные стили */
@media (max-height: 700px) {
  .chat-messages {
    max-height: calc(100vh - 180px);
  }
}

@media (max-width: 600px) {
  .message-bubble {
    max-width: 90%;
  }

  .chat-input-wrapper {
    gap: 8px;
  }

  .chat-send-btn {
    padding: 10px 15px;
  }
}

/* Добавьте в styles.css */

.message-bubble.message-questionnaire {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-left: 4px solid #4c51bf;
  margin: 10px 0;
  max-width: 85%;
  align-self: flex-start;
}

.questionnaire-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.questionnaire-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.questionnaire-text {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.questionnaire-hint {
  font-size: 12px;
  opacity: 0.8;
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}
/* Добавьте в styles.css */

.questionnaire-progress-bar {
  width: 100%;
  height: 10px;
  background-color: #e0e0e0;
  border-radius: 5px;
  margin: 10px 0;
  overflow: hidden;
}

.questionnaire-progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.portrait-stats {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-item {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Добавьте в styles.css */

.questionnaire-answers {
  max-height: 500px;
  overflow-y: auto;
  margin: 20px 0;
  padding-right: 10px;
}

.answer-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 4px solid #667eea;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.answer-number {
  background: #667eea;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.answer-category {
  background: #e9ecef;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
}

.answer-date {
  font-size: 12px;
  color: #999;
}

.answer-question {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 15px;
  color: #333;
  font-weight: 500;
}

.answer-content {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  line-height: 1.6;
}

.answer-analysis {
  background: #f0f7ff;
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid #4c51bf;
}

.analysis-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: #4c51bf;
}

.analysis-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.analysis-score {
  background: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 13px;
  border: 1px solid #e0e0e0;
}

.analysis-values,
.analysis-style,
.analysis-insights {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
  background: #f8f9fa;
  border-radius: 10px;
  margin: 20px 0;
}

.empty-history h4 {
  color: #667eea;
  margin-bottom: 15px;
}

.history-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}
.matches-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.match-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
}

.match-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.match-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.match-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  margin-right: 15px;
}

.match-info h3 {
  margin: 0 0 5px 0;
  color: #333;
}

.compatibility-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.compatibility-high {
  background-color: #d4edda;
  color: #155724;
}

.compatibility-good {
  background-color: #cce5ff;
  color: #004085;
}

.compatibility-medium {
  background-color: #fff3cd;
  color: #856404;
}

.compatibility-low {
  background-color: #f8d7da;
  color: #721c24;
}

.compatibility-very-low {
  background-color: #f1f1f1;
  color: #666;
}

.match-details {
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.match-details p {
  margin: 5px 0;
  font-size: 14px;
  color: #666;
}

.match-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.match-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
}

.btn-outline {
  background: white;
  border: 2px solid #667eea;
  color: #667eea;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: #667eea;
  color: white;
}

/* Модальное окно совместимости */
.compatibility-summary {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  align-items: center;
}

.compatibility-score {
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  min-width: 150px;
}

.compatibility-score h3 {
  font-size: 36px;
  margin: 0;
}

.compatibility-score p {
  margin: 5px 0 0 0;
  font-size: 14px;
}

.compatibility-breakdown ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.compatibility-breakdown li {
  margin: 5px 0;
  font-size: 14px;
}

.shared-interests,
.recommendations,
.profile-comparison {
  margin-top: 20px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  background: #e9ecef;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  color: #495057;
}

.profile-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.your-profile,
.partner-profile {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.your-profile h4,
.partner-profile h4 {
  margin-top: 0;
  color: #495057;
}

/* Пустое состояние */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.empty-state ul {
  text-align: left;
  display: inline-block;
  margin: 15px auto;
}

.empty-state li {
  margin: 5px 0;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* styles.css - добавить в конец файла */

/* Админ-панель */
.admin-container {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}

.admin-header {
  margin-bottom: 30px;
}

.admin-header h2 {
  color: #667eea;
  margin-bottom: 10px;
}

.admin-header p {
  color: #718096;
  font-size: 14px;
}

.admin-sections {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.admin-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e9ecef;
}

.admin-section h3 {
  color: #2d3748;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-section h3 .badge {
  background: #667eea;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-btn.primary {
  background: #667eea;
  color: white;
}

.admin-btn.primary:hover:not(:disabled) {
  background: #5a67d8;
}

.admin-btn.secondary {
  background: #48bb78;
  color: white;
}

.admin-btn.secondary:hover:not(:disabled) {
  background: #38a169;
}

.admin-btn.warning {
  background: #ed8936;
  color: white;
}

.admin-btn.warning:hover:not(:disabled) {
  background: #dd6b20;
}

.admin-btn.outline {
  background: white;
  border: 2px solid #667eea;
  color: #667eea;
}

.admin-btn.outline:hover:not(:disabled) {
  background: #667eea;
  color: white;
}

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

.admin-btn .btn-icon {
  font-size: 18px;
}

/* Прогресс выполнения */
.execution-progress {
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-status {
  font-weight: 600;
  color: #2d3748;
}

.progress-status.running {
  color: #ed8936;
}

.progress-status.completed {
  color: #48bb78;
}

.progress-status.error {
  color: #e53e3e;
}

.progress-percentage {
  font-size: 14px;
  color: #718096;
}

.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-message {
  font-size: 13px;
  color: #4a5568;
  margin-top: 5px;
}

/* Результаты выполнения */
.execution-results {
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  max-height: 300px;
  overflow-y: auto;
}

.results-header {
  font-weight: 600;
  margin-bottom: 10px;
  color: #2d3748;
}

.result-item {
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item.success {
  color: #48bb78;
}

.result-item.error {
  color: #e53e3e;
}

.result-item.info {
  color: #4299e1;
}

.result-icon {
  font-size: 16px;
}

/* Логи выполнения */
.execution-logs {
  background: #1a202c;
  color: #e2e8f0;
  padding: 15px;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  max-height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.execution-logs .log-line {
  margin-bottom: 2px;
}

.execution-logs .log-time {
  color: #718096;
  margin-right: 10px;
}

.execution-logs .log-info {
  color: #63b3ed;
}

.execution-logs .log-success {
  color: #68d391;
}

.execution-logs .log-error {
  color: #fc8181;
}

.execution-logs .log-warning {
  color: #f6ad55;
}

/* Статистика */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.stat-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 13px;
  color: #718096;
}

/* Таблица пользователей */
.users-table {
  margin-top: 15px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #4a5568;
  font-size: 13px;
  border-bottom: 2px solid #e2e8f0;
}

.users-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
}

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

.users-table .badge {
  background: #667eea;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

/* Матрица совместимости */
.compatibility-matrix {
  margin-top: 15px;
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #e2e8f0;
}

.matrix-table {
  font-size: 12px;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  padding: 8px 12px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.matrix-table th {
  background: #f8f9fa;
  font-weight: 600;
}

.matrix-score-high {
  background: #c6f6d5;
  color: #22543d;
}

.matrix-score-medium {
  background: #fefcbf;
  color: #744210;
}

.matrix-score-low {
  background: #fed7d7;
  color: #742a2a;
}

/* Пустое состояние */
.admin-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #718096;
}

.admin-empty-state .icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.admin-empty-state p {
  margin-bottom: 20px;
}

/* styles.css - добавить в конец файла */

/* Стили для настроек */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.setting-info {
  flex: 1;
}

.setting-title {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 5px;
}

.setting-desc {
  font-size: 13px;
  color: #718096;
}

.setting-control {
  margin-left: 20px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e0;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #667eea;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* styles.css - добавить стили для совместимости */

.compatibility-summary {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.compatibility-score {
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  min-width: 150px;
}

.compatibility-score.compatibility-high {
  background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
  color: #22543d;
}

.compatibility-score.compatibility-good {
  background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
  color: #2c5282;
}

.compatibility-score.compatibility-medium {
  background: linear-gradient(135deg, #fefcbf 0%, #faf089 100%);
  color: #744210;
}

.compatibility-score.compatibility-low {
  background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
  color: #742a2a;
}

.compatibility-score h3 {
  font-size: 48px;
  margin: 0 0 5px 0;
  font-weight: 700;
}

.compatibility-score p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.compatibility-breakdown {
  flex: 1;
}

.compatibility-breakdown h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #4a5568;
}

.compatibility-breakdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.compatibility-breakdown li {
  margin: 8px 0;
  font-size: 14px;
  color: #4a5568;
}

.shared-interests,
.complementary-traits,
.recommendations {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.shared-interests h4,
.complementary-traits h4,
.recommendations h4 {
  margin: 0 0 10px 0;
  color: #4a5568;
  font-size: 14px;
}

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

.tag {
  background: #e9ecef;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  color: #495057;
}

.profile-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.your-profile h4,
.partner-profile h4 {
  margin: 0 0 10px 0;
  color: #4a5568;
  font-size: 13px;
}

.recommendations ul {
  margin: 0;
  padding-left: 20px;
}

.recommendations li {
  margin: 5px 0;
  font-size: 13px;
  color: #4a5568;
}
/* Скрываем верхние кнопки на всякий случай */
.header-actions {
  display: none !important;
}

/* Также скрываем старый logout если он где-то остался */
#logout-btn {
  display: none !important;
}
/* Список чатов */
.chat-list-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
}

.chat-list-header {
  padding: 20px;
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.chat-list-header h2 {
  margin: 0;
  color: #2d3748;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: white;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-item:hover {
  background: #f8f9fa;
}

.chat-item.unread {
  background: #e8f4fd;
}

.chat-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 15px;
}

.chat-info {
  flex: 1;
}

.chat-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 5px;
}

.chat-last-message {
  font-size: 13px;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-meta {
  text-align: right;
}

.chat-time {
  font-size: 11px;
  color: #a0aec0;
  margin-bottom: 5px;
}

.unread-badge {
  background: #e53e3e;
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.empty-chats {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

/* Окно чата */
.chat-window-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-window-header {
  display: flex;
  align-items: center;
  padding: 15px;
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.back-to-chats {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #667eea;
  margin-right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-chats:hover {
  background: #f0f0f0;
}

.chat-partner {
  display: flex;
  align-items: center;
  flex: 1;
}

.partner-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-right: 12px;
}

.partner-name {
  font-weight: 600;
  color: #2d3748;
}

.partner-status {
  font-size: 12px;
  color: #48bb78;
}

.chat-window-container .chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #f8f9fa;
}

.chat-window-container .chat-input-area {
  padding: 15px;
  background: white;
  border-top: 1px solid #e9ecef;
}

.chat-window-container .chat-input-wrapper {
  display: flex;
  gap: 10px;
}

.chat-window-container .chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
}

.chat-window-container .chat-input:focus {
  border-color: #667eea;
}

.chat-window-container .chat-send-btn {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
}

.chat-window-container .chat-send-btn:hover {
  background: #5a67d8;
}
/* Кнопка чата в карточке партнера */
.btn-chat {
  background: #48bb78;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-chat:hover {
  background: #38a169;
  transform: translateY(-1px);
}

/* Адаптация для мобильных устройств */
@media (max-width: 600px) {
  .match-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .match-actions button {
    flex: 1;
    min-width: 70px;
    font-size: 12px;
    padding: 6px 10px;
  }
}
.match-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.match-actions button {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-weight: 500;
}

.match-actions .btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.match-actions .btn-secondary:hover {
  background: #cbd5e0;
}

.match-actions .btn-primary {
  background: #667eea;
  color: white;
}

.match-actions .btn-primary:hover {
  background: #5a67d8;
}

.match-actions .btn-chat {
  background: #48bb78;
  color: white;
}

.match-actions .btn-chat:hover {
  background: #38a169;
}

.match-actions .btn-outline {
  background: white;
  border: 1px solid #667eea;
  color: #667eea;
}

.match-actions .btn-outline:hover {
  background: #667eea;
  color: white;
}
.modal .close {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
}

.modal .close:hover {
  color: black;
}
/* Исправленные стили для окна чата */
.chat-window-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-window-header {
  display: flex;
  align-items: center;
  padding: 15px;
  background: white;
  border-bottom: 1px solid #e9ecef;
  flex-shrink: 0;
}

.back-to-chats {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #667eea;
  margin-right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.back-to-chats:hover {
  background: #f0f0f0;
}

.chat-partner {
  display: flex;
  align-items: center;
  flex: 1;
}

.partner-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-right: 12px;
  flex-shrink: 0;
}

.partner-name {
  font-weight: 600;
  color: #2d3748;
}

.partner-status {
  font-size: 12px;
  color: #48bb78;
}

/* Область сообщений - должна занимать всё свободное место */
.chat-window-container .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #f8f9fa;
  min-height: 0; /* Важно для flex */
}

/* Область ввода - фиксируется внизу */
.chat-window-container .chat-input-area {
  padding: 15px;
  background: white;
  border-top: 1px solid #e9ecef;
  flex-shrink: 0;
}

.chat-window-container .chat-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-window-container .chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
}

.chat-window-container .chat-input:focus {
  border-color: #667eea;
}

.chat-window-container .chat-send-btn {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-window-container .chat-send-btn:hover {
  background: #5a67d8;
}

/* Нижняя навигация */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  background: white;
  border-top: 1px solid #e9ecef;
  flex-shrink: 0;
}
/* Секция чата должна занимать всё пространство */
#chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
.main-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
