/* ================================================================ */
/*                      ПЕРЕМЕННЫЕ ТЕМЫ                             */
/* ================================================================ */
:root {
  --brand-1: #667eea;
  --brand-2: #764ba2;
  --brand-1-hover: #5a6fd6;
  --brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  --container-bg: rgba(255, 255, 255, 0.92);
  --container-border: rgba(255, 255, 255, 0.5);
  --card-bg: rgba(255, 255, 255, 0.65);
  --card-bg-hover: rgba(255, 255, 255, 0.85);

  --text-primary: #1f2233;
  --text-secondary: #555b70;
  --text-muted: #8b90a3;
  --text-invert: #ffffff;

  --border-color: rgba(102, 126, 234, 0.15);
  --border-focus: rgba(102, 126, 234, 0.55);
  --input-bg: rgba(255, 255, 255, 0.85);

  --message-own-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --message-own-color: #ffffff;
  --message-other-bg: rgba(255, 255, 255, 0.95);
  --message-other-border: rgba(102, 126, 234, 0.12);
  --message-other-color: #1f2233;
  --system-bg: rgba(102, 126, 234, 0.08);
  --system-color: #5a6fd6;

  --shadow-color: rgba(31, 34, 51, 0.18);
  --shadow-sm: 0 4px 14px rgba(31, 34, 51, 0.06);
  --shadow-md: 0 12px 32px rgba(31, 34, 51, 0.10);
  --shadow-lg: 0 25px 60px rgba(31, 34, 51, 0.18);

  --btn-primary-bg: var(--brand-gradient);
  --btn-primary-hover: linear-gradient(135deg, #5a6fd6 0%, #6a3f96 100%);
  --btn-next-bg: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  --btn-next-hover: linear-gradient(135deg, #ee5a5a 0%, #d94a4a 100%);
  --btn-edit-bg: linear-gradient(135deg, #ffb74d 0%, #ffa726 100%);
  --btn-edit-hover: linear-gradient(135deg, #ffa726 0%, #f39200 100%);
  --btn-cancel-bg: #e8eaf0;
  --btn-cancel-hover: #dadde6;

  --header-border: rgba(102, 126, 234, 0.12);
  --chat-bg: rgba(248, 249, 252, 0.75);
  --modal-overlay: rgba(15, 17, 30, 0.55);
  --modal-bg: #ffffff;
  --modal-text: #1f2233;
  --hover-bg: rgba(102, 126, 234, 0.08);

  --body-bg-image: url('/images/background.jpg');
}

body.dark-theme {
  --brand-1: #6b8cff;
  --brand-2: #9b6bff;
  --brand-1-hover: #5a7bef;
  --brand-gradient: linear-gradient(135deg, #4a6cf7 0%, #7c4dff 100%);

  --container-bg: rgba(28, 30, 48, 0.92);
  --container-border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-bg-hover: rgba(255, 255, 255, 0.08);

  --text-primary: #f0f1f7;
  --text-secondary: #b6bbd0;
  --text-muted: #888da3;
  --text-invert: #ffffff;

  --border-color: rgba(255, 255, 255, 0.10);
  --border-focus: rgba(107, 140, 255, 0.65);
  --input-bg: rgba(45, 48, 70, 0.85);

  --message-own-bg: linear-gradient(135deg, #4a6cf7 0%, #7c4dff 100%);
  --message-own-color: #ffffff;
  --message-other-bg: rgba(48, 51, 74, 0.95);
  --message-other-border: rgba(255, 255, 255, 0.08);
  --message-other-color: #e6e8f2;
  --system-bg: rgba(107, 140, 255, 0.12);
  --system-color: #8ea9ff;

  --shadow-color: rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.55);

  --btn-primary-bg: var(--brand-gradient);
  --btn-primary-hover: linear-gradient(135deg, #3a5cd7 0%, #6a3fd9 100%);
  --btn-next-bg: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  --btn-next-hover: linear-gradient(135deg, #d94332 0%, #a53224 100%);
  --btn-edit-bg: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
  --btn-edit-hover: linear-gradient(135deg, #e08e0f 0%, #b87708 100%);
  --btn-cancel-bg: #3a3d54;
  --btn-cancel-hover: #464a63;

  --header-border: rgba(255, 255, 255, 0.08);
  --chat-bg: rgba(22, 24, 38, 0.75);
  --modal-overlay: rgba(0, 0, 0, 0.7);
  --modal-bg: #262942;
  --modal-text: #f0f1f7;
  --hover-bg: rgba(255, 255, 255, 0.06);

  --body-bg-image: url('/images/background-dark.jpg');
}

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

html {
  height: 100%;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--brand-1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: var(--brand-1);
  background-image: var(--body-bg-image);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  z-index: -2;
  pointer-events: none;
  transition: background-color 0.3s ease;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(102, 126, 234, 0.25) 0%, rgba(20, 20, 40, 0.35) 70%);
  z-index: -1;
  pointer-events: none;
}

/* ================================================================ */
/*              СТРУКТУРА: #app → .container                        */
/* ================================================================ */
#app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: var(--container-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  transition: background 0.3s ease;
}

/* ================================================================ */
/*                    ЭКРАН РЕГИСТРАЦИИ                             */
/* ================================================================ */
#registration {
  display: block;
  overflow-y: auto;
  padding: 32px 24px 80px;
  -webkit-overflow-scrolling: touch;
}

/* ================================================================ */
/*                       ЭКРАН ЧАТА                                 */
/* ================================================================ */
#chatApp {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 20px 20px;
}

#chatApp > header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
}

#searchPanel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  text-align: center;
  overflow: hidden;
}

#chatPanel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#chatHeader {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1.5px solid var(--header-border);
  margin-bottom: 4px;
}

#messages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 12px;
  margin: 6px 0 0 0;
  border-radius: 18px;
  background: var(--chat-bg);
  -webkit-overflow-scrolling: touch;
  transition: background 0.3s;
}

.input-container {
  flex-shrink: 0;
  margin-top: 10px;
  padding-bottom: 4px;
  position: relative;
}

/* ================================================================ */
/*                       ЗАГОЛОВКИ                                  */
/* ================================================================ */
h1 {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand-1);
  text-align: center;
  margin-bottom: 10px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  transition: color 0.3s;
}

h2 {
  color: var(--text-primary);
  text-align: center;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 24px;
  letter-spacing: -0.2px;
}

#registration h1 {
  margin-bottom: 0;
  font-size: 24px;
}

/* ================================================================ */
/*                       ПОЛЯ ВВОДА                                 */
/* ================================================================ */
input, select {
  width: 100%;
  padding: 16px 18px;
  margin: 8px 0;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-primary);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder { color: var(--text-muted); }
input:hover, select:hover { border-color: var(--border-focus); }
input:focus, select:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
  background: var(--card-bg-hover);
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b90a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 44px;
  cursor: pointer;
}

label[for="searchGenderSelect"],
label[for="searchAgeRangeSelect"] {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 2px;
}

/* ================================================================ */
/*                          КНОПКИ                                  */
/* ================================================================ */
button {
  padding: 16px 20px;
  background: var(--btn-primary-bg);
  color: var(--text-invert);
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.30);
}

button:hover:not(:disabled) {
  background: var(--btn-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.40);
}
button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ================================================================ */
/*              ГРУППЫ КНОПОК ДЕЙСТВИЙ                              */
/* ================================================================ */
.form-actions,
.search-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  align-items: stretch;
}

.form-actions .btn-primary,
.search-actions .btn-primary {
  flex: 1 1 auto;
  min-width: 0;
}

.form-actions .btn-secondary,
.search-actions .btn-secondary {
  flex: 0 0 auto;
  white-space: nowrap;
  box-shadow: none;
  padding-left: 22px;
  padding-right: 22px;
}

.form-actions .btn-secondary {
  background: var(--btn-cancel-bg);
  color: var(--text-primary);
}
.form-actions .btn-secondary:hover:not(:disabled) {
  background: var(--btn-cancel-hover);
  box-shadow: none;
}

.search-actions .btn-secondary {
  background: var(--btn-edit-bg);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 183, 77, 0.30);
}
.search-actions .btn-secondary:hover:not(:disabled) {
  background: var(--btn-edit-hover);
  box-shadow: 0 10px 24px rgba(255, 183, 77, 0.40);
}

@media (max-width: 560px) {
  .form-actions,
  .search-actions { flex-direction: column; }
  .form-actions .btn-primary,
  .form-actions .btn-secondary,
  .search-actions .btn-primary,
  .search-actions .btn-secondary {
    flex: 1 1 auto;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ================================================================ */
/*                        ПОИСК                                     */
/* ================================================================ */
#searchStatus {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 15px 0 0;
}

#queueInfo {
  display: inline-block;
  color: var(--system-color);
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
  padding: 8px 16px;
  background: var(--system-bg);
  border-radius: 999px;
}

#partnerName {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#partnerName::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  flex-shrink: 0;
}

#nextBtn {
  width: auto;
  padding: 9px 16px;
  font-size: 13px;
  background: var(--btn-next-bg);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
#nextBtn:hover {
  background: var(--btn-next-hover);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

/* ================================================================ */
/*                       СООБЩЕНИЯ                                  */
/* ================================================================ */
.message {
  margin: 6px 8px;
  padding: 11px 15px;
  border-radius: 18px;
  max-width: 82%;
  word-wrap: break-word;
  font-size: 15px;
  line-height: 1.45;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  animation: fadeIn 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.message.own {
  background: var(--message-own-bg);
  color: var(--message-own-color);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.message.other {
  background: var(--message-other-bg);
  color: var(--message-other-color);
  border: 1px solid var(--message-other-border);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.message .sender {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
  margin-bottom: 4px;
  color: var(--brand-1);
}
.message.own .sender { color: rgba(255, 255, 255, 0.9); }

.message .time {
  font-size: 10px;
  opacity: 0.6;
  text-align: right;
  margin-top: 4px;
  color: inherit;
}

#userInfo {
  text-align: right;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* ================================================================ */
/*                     МОДАЛЬНОЕ ОКНО                               */
/* ================================================================ */
#modalOverlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--modal-overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOverlay 0.25s ease;
  padding: 20px;
}

#modalOverlay.active { display: flex; }

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

#modalBox {
  background: var(--modal-bg);
  border-radius: 24px;
  padding: 32px 28px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

#modalBox h3 {
  font-size: 20px;
  color: var(--modal-text);
  margin-bottom: 12px;
  text-align: center;
  font-weight: 700;
}

#modalBox p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.55;
}

#modalActions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 26px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.modal-btn.cancel {
  background: var(--btn-cancel-bg);
  color: var(--text-primary);
  box-shadow: none;
}
.modal-btn.cancel:hover { background: var(--btn-cancel-hover); transform: none; }

.modal-btn.ok {
  background: var(--btn-primary-bg);
  color: white;
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.30);
}
.modal-btn.ok:hover {
  background: var(--btn-primary-hover);
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.40);
}

/* ================================================================ */
/*                  КНОПКИ ПЕРЕКЛЮЧЕНИЯ ТЕМЫ                       */
/* ================================================================ */
#themeToggle,
#themeToggleReg {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  box-shadow: none;
  color: var(--text-primary);
  flex-shrink: 0;
}
#themeToggle:hover,
#themeToggleReg:hover {
  background: var(--card-bg-hover);
  transform: rotate(15deg) scale(1.05);
  box-shadow: none;
}

/* ================================================================ */
/*                     БЛОК ВВОДА СООБЩЕНИЙ                         */
/* ================================================================ */
.message-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 8px;
  background: var(--input-bg);
  border-radius: 24px;
  border: 1.5px solid var(--border-color);
  transition: border-color 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-sm);
}

.message-input-wrapper:focus-within {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.message-input-wrapper .input-field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  padding: 8px 6px;
  resize: none;
  max-height: 120px;
  min-height: 38px;
  font-family: inherit;
  line-height: 1.4;
  margin: 0;
}

.message-input-wrapper .input-field::placeholder { color: var(--text-muted); }
.message-input-wrapper .input-field:disabled { opacity: 0.5; }

.input-btn, .action-btn, .send-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  box-shadow: none;
}

.input-btn:hover, .action-btn:hover {
  background: var(--hover-bg);
  transform: none;
  box-shadow: none;
}

.send-btn {
  background: var(--btn-primary-bg);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}
.send-btn:hover {
  background: var(--btn-primary-hover);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.45);
}

.action-btn { color: var(--text-secondary); }
.action-btn.recording,
.action-btn.recording-video {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
  animation: pulse-rec 1s infinite;
}
@keyframes pulse-rec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ================================================================ */
/*                      ПРОГРЕСС ЗАГРУЗКИ                           */
/* ================================================================ */
#uploadProgressContainer {
  margin-top: 10px;
  padding: 0 8px;
}
.upload-progress {
  width: 100%;
  height: 5px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  background: var(--brand-gradient);
  transition: width 0.3s;
  width: 0%;
  border-radius: 999px;
}
.upload-progress-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
}

/* ================================================================ */
/*                     АНИМАЦИИ                                     */
/* ================================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.typing-indicator {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px;
  font-style: italic;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ================================================================ */
/*                     SEO-БЛОК                                     */
/* ================================================================ */
.seo-content {
  margin-top: 48px;
  padding: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
  text-align: left;
}

.seo-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 22px 22px 20px;
  margin-bottom: 16px;
  transition: background 0.25s;
}
.seo-section:hover { background: var(--card-bg-hover); }

.seo-content h2 {
  font-size: 19px;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-align: left;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.seo-content h2 .emoji { font-size: 22px; }

.seo-content h3 {
  font-size: 15px;
  color: var(--text-primary);
  margin: 0 0 12px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  opacity: 0.75;
}

.seo-content ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.seo-content li {
  margin: 0;
  padding-left: 28px;
  position: relative;
  font-size: 14.5px;
  line-height: 1.5;
}

.seo-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--system-bg);
  color: var(--brand-1);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seo-content p {
  margin-bottom: 10px;
  font-size: 14.5px;
  line-height: 1.6;
}

.seo-content strong {
  color: var(--text-primary);
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.seo-content a {
  color: var(--brand-1);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--brand-1);
  transition: opacity 0.2s;
}
.seo-content a:hover { opacity: 0.75; border-bottom-style: solid; }

.seo-faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}
.seo-faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.seo-faq-item:first-of-type { padding-top: 0; }

/* ================================================================ */
/*                 ШАГИ «КАК ЭТО РАБОТАЕТ»                          */
/* ================================================================ */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 0;
}

.steps-list li::before {
  display: none;
}

.step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.steps-list strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.steps-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ================================================================ */
/*                 СЕТКА КАРТОЧЕК (безопасность/преимущества)       */
/* ================================================================ */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 16px 14px;
  transition: background 0.25s, transform 0.2s, border-color 0.25s;
}

.feature-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 8px;
}

.feature-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.feature-card a {
  color: var(--brand-1);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--brand-1);
}

.feature-card a:hover {
  border-bottom-style: solid;
}

/* ================================================================ */
/*                        ФУТЕР                                     */
/* ================================================================ */
.site-footer {
  margin-top: 24px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  align-items: center;
  font-size: 13px;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-footer a:hover {
  color: var(--brand-1);
  border-bottom-color: var(--brand-1);
}

.site-footer .copyright {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 8px;
}

/* ================================================================ */
/*                     ЧЕКБОКС СОГЛАСИЯ                             */
/* ================================================================ */
.agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--brand-1);
  cursor: pointer;
  flex-shrink: 0;
}

.agree a {
  color: var(--brand-1);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--brand-1);
}
.agree a:hover { border-bottom-style: solid; }

/* ================================================================ */
/*                    ДЕСКТОП                                       */
/* ================================================================ */
@media (min-width: 768px) {
  body {
    padding: 24px;
    align-items: center;
  }

  .container {
    flex: 0 0 auto;
    width: 100%;
    max-width: 520px;
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--container-border);
  }

  #registration {
    height: auto;
    max-height: calc(100dvh - 48px);
    padding: 44px 44px 60px;
  }

  #chatApp {
    height: calc(100dvh - 48px);
    max-height: 900px;
    padding: 28px 32px;
  }

  .seo-content ul {
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .feature-card {
    padding: 18px 18px 16px;
  }
}

/* ================================================================ */
/*              ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ                              */
/* ================================================================ */
@media (max-width: 380px) {
  #registration { padding-left: 16px; padding-right: 16px; }
  #chatApp { padding-left: 14px; padding-right: 14px; }
  #registration h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  .seo-section { padding: 18px; }
  .seo-content h2 { font-size: 17px; }
  #nextBtn { font-size: 12px; padding: 8px 12px; }
}