@import url("https://fonts.googleapis.com/css2?family=Vollkorn:wght@600;700;800&display=block");

.dispute-stake-emojis-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.stake-emojis {
  font-size: 22px;
  margin-left: 8px;
}

/* ============================================
   ТЕМЫ: ТЁМНАЯ И СВЕТЛАЯ
   ============================================ */
:root {
  --bg: #0a0a0c;
  --bg-gradient: radial-gradient(circle at top, #1a1a2e 0%, #0a0a0c 100%);
  --surface: #141821;
  --surface-soft: #1b2336;
  --surface-soft-2: #101520;
  --text: #f1f4fb;
  --muted: #a0a8bc;
  --line: rgba(127, 116, 255, 0.15);
  --line-strong: #7f74ff;
  --open: #3dd57f;
  --pending: #f2b15d;
  --in-progress: #7d73ff;
  --cancelled: #d76f79;
  --finished: #8d96ab;
  --danger: #d86d75;
  --primary: #7f74ff;
  --home-accent: #8b86f0;
  --home-accent-strong: #7e79eb;
  --home-accent-deep: #6f6adf;
  --radius: 20px;
}

:root[data-theme="light"] {
  --bg: #f5f7fc;
  --bg-gradient: linear-gradient(180deg, #f3f6ff 0%, #edf2fc 100%);
  --surface: #ffffff;
  --surface-soft: #edf1ff;
  --surface-soft-2: #f6f8ff;
  --text: #20273a;
  --muted: #68718a;
  --line: #d6dff3;
  --line-strong: #b8c8ea;
  --open: #1e9d56;
  --pending: #e59a3d;
  --in-progress: #5f60ee;
  --cancelled: #cb5b67;
  --finished: #7b859a;
  --danger: #c64d60;
  --primary: #6264ea;
  --home-accent: #6f6de0;
  --home-accent-strong: #6562d6;
  --home-accent-deep: #5855c8;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  transition: background 0.32s ease, color 0.32s ease;
  overflow-y: scroll;
}

#app {
  min-height: 100vh;
}

button,
[role="button"],
.action,
.emoji-btn,
.stake-btn,
.stake-emoji,
.chip-btn,
.theme-toggle {
  cursor: pointer;
}

/* ============================================
   ЗАГОЛОВОК
   ============================================ */
.title {
  margin: 0;
  font-family: 'Vollkorn', serif;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0.01em;
  font-weight: 700;
  display: block;
  width: fit-content;
  margin: 0 auto 38px;
  color: var(--home-accent);
  text-shadow: 0 8px 22px rgba(120, 115, 229, 0.24);
}

/* ============================================
   КОНТЕЙНЕР СТРАНИЦ
   ============================================ */
.page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px 18px 20px;
  display: grid;
  gap: 24px;
  transition: none !important;
}

.page.cards-page {
  gap: 5px;
}

.page.create-page {
  gap: 14px;
}

.page > * {
  width: 100%;
}

:root[data-theme="dark"] .title.title-cool,
:root[data-theme="dark"] .title.title-royal {
  color: var(--home-accent);
  text-shadow: 0 8px 22px rgba(120, 115, 229, 0.24);
}

:root[data-theme="light"] .title.title-cool,
:root[data-theme="light"] .title.title-royal {
  color: var(--home-accent);
  text-shadow: 0 5px 14px rgba(111, 109, 224, 0.18);
}

/* ============================================
   ВЕРХНЯЯ ПАНЕЛЬ (ТОПБАР)
   ============================================ */
.page-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0px;
  gap: 20px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  transition: none !important;
}

.topbar-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-center-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.topbar-right-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cards-filters-container {
  display: flex;
  justify-content: center;
  margin: 5px 0 20px 0;
  width: 100%;
}

.cards-filters {
  display: flex;
  gap: 20px;
}

@media (max-width: 820px) {
  .page-topbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .topbar-center-group {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
  .cards-filters {
    gap: 8px;
  }
}

/* Кнопка "На главную" */
.cards-home-btn {
  min-height: 42px;
  min-width: 78px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft-2) 100%);
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  transition: all 0.2s ease;
}

.cards-home-btn:hover {
  color: #8ea8ff;
  background: linear-gradient(180deg, #1a2744 0%, #16203a 100%);
}

:root[data-theme="light"] .cards-home-btn {
  color: #4f63a1;
  background: linear-gradient(180deg, #eef2fb 0%, #e5ebf8 100%);
}

:root[data-theme="light"] .cards-home-btn:hover {
  color: #3f4da4;
  background: linear-gradient(180deg, #e2e9ff 0%, #d8e2fb 100%);
}

/* Переключатель темы */
.theme-toggle {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  height: 42px;
  width: 78px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-toggle-track {
  width: 64px;
  height: 28px;
  background: #2b3250;
  border-radius: 999px;
  padding: 0;
  position: relative;
}

:root[data-theme="light"] .theme-toggle-track {
  background: #c9d2eb;
}

.theme-toggle-thumb {
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  left: 5px;
  top: 3px;
  transform: translateX(0);
  transition: transform 0.2s ease;
  z-index: 0;
}

.theme-toggle.is-light .theme-toggle-thumb {
  transform: translateX(32px);
}

.theme-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  position: absolute;
  top: 3px;
  z-index: 1;
  font-size: 12px;
  line-height: 1;
}

.theme-icon.sun {
  left: 37px;
}

.theme-icon.moon {
  left: 5px;
}

/* Информация об аккаунте */
.topbar-account {
  color: var(--home-accent);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  padding: 0 6px;
}

/* Кнопка выхода */
.topbar-logout {
  min-height: 42px;
  min-width: 78px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft-2) 100%);
  color: var(--muted);
  cursor: pointer;
  font-size: 17px;
  transition: all 0.2s ease;
}

.topbar-logout:hover {
  color: #8ea8ff;
  background: linear-gradient(180deg, #1a2744 0%, #16203a 100%);
}

:root[data-theme="light"] .topbar-logout {
  color: var(--muted);
  background: linear-gradient(180deg, #eef2fb 0%, #e5ebf8 100%);
}

:root[data-theme="light"] .topbar-logout:hover {
  color: #3f4da4;
  background: linear-gradient(180deg, #e2e9ff 0%, #d8e2fb 100%);
}

/* ============================================
   КНОПКИ ФИЛЬТРОВ
   ============================================ */
.cards-filter-btn {
  position: relative;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft-2) 100%);
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 130px;
  width: 130px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cards-filter-btn.is-active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--in-progress) 100%);
  color: white;
}

.cards-filter-btn.filter-active.is-active {
  background: linear-gradient(135deg, var(--pending) 0%, var(--open) 100%);
  color: white;
}

.cards-filter-btn.filter-completed.is-active {
  background: linear-gradient(135deg, var(--finished) 0%, var(--cancelled) 100%);
  color: white;
}

.cards-filter-btn:hover:not(.is-active) {
  background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface) 100%);
  color: var(--text);
  border-color: var(--line-strong);
}

:root[data-theme="light"] .cards-filter-btn {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  border: 1px solid #d8e0f3;
  color: #4f63a1;
}

:root[data-theme="light"] .cards-filter-btn.is-active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--in-progress) 100%);
  color: white;
  border-color: transparent;
}

:root[data-theme="light"] .cards-filter-btn.filter-active.is-active {
  background: linear-gradient(135deg, var(--pending) 0%, var(--open) 100%);
  color: white;
}

:root[data-theme="light"] .cards-filter-btn.filter-completed.is-active {
  background: linear-gradient(135deg, var(--finished) 0%, var(--cancelled) 100%);
  color: white;
}

@media (max-width: 820px) {
  .cards-filter-btn {
    min-width: 110px;
    width: 110px;
    padding: 6px 12px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .cards-filter-btn {
    min-width: 95px;
    width: 95px;
    padding: 6px 8px;
    font-size: 13px;
  }
}

/* ============================================
   КАРТОЧКИ И ОБЩИЕ СТИЛИ
   ============================================ */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft-2) 100%);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(4, 8, 18, 0.34), inset 0 1px 0 rgba(110, 140, 214, 0.14);
  transition: box-shadow 0.24s ease, border-color 0.24s ease;
}

.mosaic {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  gap: 24px;
  justify-content: center;
}

.counter-card {
  min-height: 114px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft-2) 100%);
  box-shadow: inset 0 1px 0 rgba(130, 148, 205, 0.15);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.counter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}

:root[data-theme="light"] .counter-card {
  border: 1px solid #d8e0f3;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

:root[data-theme="light"] .counter-card:hover {
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
}

.counter-label {
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
}

.counter-card.total .counter-label {
  color: #95a7ff;
}

.counter-card.active .counter-label {
  color: #67d690;
}

.counter-card.completed .counter-label {
  color: #f1b56a;
}

.counter-value {
  margin-top: 4px;
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}

/* Бейдж для количества приглашений */
.counter-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(33, 108, 78, 0.85);
  color: #44de9c;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 14px;
  font-weight: bold;
  min-width: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

:root[data-theme="light"] .counter-badge {
  background: rgba(33, 108, 78, 0.24);
  color: #2a8d67;
}

/* Карусель цитат */
.carousel-text {
  margin-top: 34px;
  text-align: center;
  font-size: clamp(15px, 1.95vw, 22px);
  line-height: 1.34;
  opacity: 1;
  transition: opacity 0.26s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

.carousel-text.is-fading {
  opacity: 0;
}

.carousel-author {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  color: #a9b6d6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: normal;
  letter-spacing: 0;
}

.carousel-fact-main {
  display: block;
  font-family: inherit;
  font-size: inherit;
  color: #b8c7e8;
}

.row-buttons {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   КНОПКА НА ГЛАВНОЙ СТРАНИЦЕ
   ============================================ */
.home-actions {
  margin-top: 48px;
  width: min(320px, 100%);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
}

.home-actions .action.primary {
  width: 100%;
  min-height: 56px;
  font-size: 20px;
  font-weight: 600;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--home-accent) 0%, var(--home-accent-deep) 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(120, 115, 229, 0.3);
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.home-actions .action.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.home-actions .action.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(120, 115, 229, 0.4);
  background: linear-gradient(135deg, var(--home-accent-strong) 0%, var(--home-accent) 100%);
}

.home-actions .action.primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(120, 115, 229, 0.3);
}

/* ============================================
   СТРАНИЦА АВТОРИЗАЦИИ
   ============================================ */
.auth-page {
  align-content: center;
}

.auth-card {
  width: min(540px, 100%);
  margin: 0 auto;
}

.auth-switch {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-tab {
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 42px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft-2) 100%);
  color: var(--muted);
  cursor: pointer;
}

.auth-tab.is-active {
  color: #f1f4fb;
  border-color: transparent;
  background: linear-gradient(180deg, #2d3f76, #243460);
}

.auth-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.auth-error {
  margin-top: 8px;
  text-align: center;
  color: var(--cancelled);
  font-size: 14px;
}

.auth-actions {
  margin-top: 12px;
}

.auth-actions .action {
  min-width: 220px;
}

/* ============================================
   ОБЩИЕ СТИЛИ КНОПОК ACTION
   ============================================ */
.action {
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 17px;
  color: #f2f6ff;
  background: linear-gradient(180deg, #334975 0%, #293d65 52%, #233457 100%);
  transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
  box-shadow: 0 8px 18px rgba(7, 14, 31, 0.32);
}

.action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(7, 14, 31, 0.38);
  filter: brightness(1.06);
}

.action.primary {
  background: linear-gradient(180deg, #3b5696 0%, #304780 52%, #273a69 100%);
  color: #f2f6ff;
}

.action.secondary {
  background: linear-gradient(180deg, #334975 0%, #293d65 52%, #233457 100%);
  color: #f2f6ff;
}

.action.ghost {
  background: linear-gradient(180deg, #334975 0%, #293d65 52%, #233457 100%);
  color: #f2f6ff;
}

:root[data-theme="light"] .action,
:root[data-theme="light"] .action.primary,
:root[data-theme="light"] .action.secondary,
:root[data-theme="light"] .action.ghost {
  color: #f2f6ff;
  background: linear-gradient(180deg, #556fb5, #3f5fa9);
}

/* ============================================
   ФОРМЫ И ПОЛЯ ВВОДА
   ============================================ */
.form-layout {
  display: grid;
  gap: 12px;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}

.form-field {
  display: grid;
  gap: 7px;
}

.input,
.textarea,
.select {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-soft-2), var(--surface));
  min-height: 52px;
  padding: 10px 14px;
  font-size: 18px;
  width: 100%;
  color: var(--text);
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.block-title {
  margin: 0 0 18px;
  font-size: 30px;
  text-align: center;
  color: var(--in-progress);
}

/* Поля ввода в светлой теме */
:root[data-theme="light"] .input,
:root[data-theme="light"] .textarea {
  background: #ffffff !important;
  border: 1px solid #d8e0f3 !important;
  color: #20273a !important;
}

:root[data-theme="light"] .input::placeholder,
:root[data-theme="light"] .textarea::placeholder {
  color: #a0a8bc !important;
  opacity: 1 !important;
}

:root[data-theme="light"] .input:focus,
:root[data-theme="light"] .textarea:focus {
  border-color: #6f6de0 !important;
  outline: none !important;
  background: #ffffff !important;
}

:root[data-theme="light"] .input:focus::placeholder,
:root[data-theme="light"] .textarea:focus::placeholder {
  color: transparent !important;
}

:root[data-theme="dark"] .input::placeholder,
:root[data-theme="dark"] .textarea::placeholder {
  color: rgba(255, 255, 255, 0.52);
  opacity: 1;
}

:root[data-theme="dark"] .input:focus::placeholder,
:root[data-theme="dark"] .textarea:focus::placeholder {
  color: transparent;
}

/* ============================================
   СЕТКА ЭМОДЗИ ДЛЯ КАТЕГОРИЙ
   ============================================ */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.emoji-btn {
  border: 0;
  background: linear-gradient(180deg, #20283b 0%, #1b2335 100%);
  border-radius: 16px;
  min-height: 92px;
  font-size: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emoji-btn.selected {
  background: linear-gradient(180deg, #2d3f76, #243460);
}

.emoji-label {
  position: static;
  transform: none;
  font-size: 20px;
  color: #9ea7ff;
  font-weight: 400;
  font-family: inherit;
  white-space: nowrap;
  margin-top: 4px;
}

:root[data-theme="light"] .emoji-label {
  color: #4f63a1;
}

:root[data-theme="light"] .emoji-btn {
  background: linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
  color: #2a3555;
}

:root[data-theme="light"] .emoji-btn.selected {
  background: linear-gradient(180deg, #c7d8ff, #b9ccff);
}

/* ============================================
   БЛОКИ СОЗДАНИЯ СПОРА
   ============================================ */
.create-block {
  --create-content-inline: 4px;
  padding: 20px 18px 18px;
  border-radius: 18px;
  background: rgb(20, 20, 20);
  border: 1px solid transparent;
  box-shadow: 0 14px 30px rgba(5, 9, 20, 0.36), inset 0 1px 0 rgba(148, 173, 237, 0.12);
  overflow: hidden;
}

.create-block.is-invalid-flash {
  animation: create-invalid-flash 500ms ease-in-out;
}

:root[data-theme="light"] .create-block {
  background: linear-gradient(180deg, #eef2fb 0%, #e5ebf8 100%);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(99, 120, 167, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

@keyframes create-invalid-flash {
  0%, 100% {
    box-shadow: 0 14px 30px rgba(5, 9, 20, 0.36), inset 0 1px 0 rgba(148, 173, 237, 0.12);
  }
  14%, 54% {
    box-shadow: 0 14px 30px rgba(5, 9, 20, 0.36), inset 0 0 0 1px rgba(120, 115, 229, 0.92), inset 0 1px 0 rgba(148, 173, 237, 0.12);
  }
  32%, 72% {
    box-shadow: 0 14px 30px rgba(5, 9, 20, 0.36), inset 0 1px 0 rgba(148, 173, 237, 0.12);
  }
}

/* ============================================
   БЛОК ДЕТАЛЕЙ (НАЗВАНИЕ И ОПИСАНИЕ)
   ============================================ */
.block-details .input,
.block-details .textarea {
  border: 0;
  box-shadow: none;
  background: linear-gradient(180deg, #20283b 0%, #1b2335 100%);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 1px;
  color: #ffffff;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block-details .input {
  line-height: 1.1;
  padding: 10px 14px;
  min-height: 52px;
  display: block;
}

.block-details .textarea {
  min-height: 68px;
  height: auto;
  padding: 0;
  resize: none;
  overflow-y: auto;
  line-height: 1.3;
}

/* Отступ между названием и описанием */
.block-details .form-field + .form-field {
  margin-top: 10px;
}

/* Дополнительная высота для поля описания */
.block-details .form-field:last-child .input {
  min-height: 68px;
  height: auto;
  padding: 16px 14px;
}

/* Светлая тема для блока деталей */
:root[data-theme="light"] .block-details .input,
:root[data-theme="light"] .block-details .textarea {
  background: linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
  color: #2a3555;
}

:root[data-theme="light"] .block-details .input::placeholder,
:root[data-theme="light"] .block-details .textarea::placeholder {
  color: rgba(42, 53, 85, 0.48);
}

:root[data-theme="light"] .block-details .input:focus::placeholder,
:root[data-theme="light"] .block-details .textarea:focus::placeholder {
  color: transparent !important;
}

/* ============================================
   БЛОК СТАВКИ И ДЕДЛАЙНА
   ============================================ */
.deadline-layout {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  max-width: 560px;
  margin: 0 auto;
  align-items: center;
}

.left-column,
.right-column {
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

/* Блок ставки */
.stake-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stake-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.stake-box {
  width: 70px;
  text-align: center;
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  line-height: 48px;
}

.stake-btn {
  width: 48px;
  height: 48px;
  border: 0;
  background: linear-gradient(180deg, #20283b 0%, #1b2335 100%);
  color: #fff;
  font-size: 24px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.stake-btn:hover {
  background: linear-gradient(180deg, #2d3f76, #243460);
  transform: scale(1.02);
}

.stake-btn:disabled {
  opacity: 0.34;
  cursor: default;
}

:root[data-theme="light"] .stake-btn {
  background: linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
  color: #2a3555;
}

:root[data-theme="light"] .stake-btn:hover {
  background: linear-gradient(180deg, #c7d8ff, #b9ccff);
}

.stake-box.is-count-animating {
  animation: stake-count-pulse 260ms ease-out;
}

.date-display.is-count-animating {
  animation: stake-count-pulse 260ms ease-out;
}

@keyframes stake-count-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.93; }
  100% { transform: scale(1); opacity: 1; }
}

/* Блок даты */
.date-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.day-col {
  display: flex;
  justify-content: center;
  width: 100%;
}

.date-picker-wrap {
  position: relative;
  width: 220px;
  max-width: 220px;
  margin: 0 auto;
  text-align: center;
}

.date-display {
  display: inline-block;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  font-weight: 400;
  text-align: center;
  line-height: 48px;
  cursor: pointer;
  padding: 0;
  min-width: 120px;
}

.date-display:hover {
  color: var(--in-progress);
}

.date-display.is-placeholder {
  opacity: 0.6;
}

.date-buttons-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
  justify-content: center;
}

.date-buttons-row .emoji-btn {
  min-height: 64px;
  width: 110px;
  font-size: 16px;
  font-weight: 400;
  background: linear-gradient(180deg, #20283b 0%, #1b2335 100%);
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: 0;
  line-height: 1.4;
  padding: 8px 6px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.date-buttons-row .emoji-btn.selected {
  background: linear-gradient(180deg, #2d3f76, #243460) !important;
  color: #fff !important;
}

.date-buttons-row .emoji-btn:hover {
  background: linear-gradient(180deg, #2d3f76, #243460);
  transform: scale(1.02);
  color: #fff;
}

:root[data-theme="light"] .date-buttons-row .emoji-btn {
  background: linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
  color: #2a3555;
}

:root[data-theme="light"] .date-buttons-row .emoji-btn.selected {
  background: linear-gradient(180deg, #c7d8ff, #b9ccff) !important;
  color: #2a3555 !important;
}

:root[data-theme="light"] .date-buttons-row .emoji-btn:hover {
  background: linear-gradient(180deg, #c7d8ff, #b9ccff);
  transform: scale(1.02);
  color: #2a3555;
}

.date-input-native {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ============================================
   КНОПКИ НА СТРАНИЦЕ СОЗДАНИЯ (СОХРАНИТЬ/ОТМЕНИТЬ)
   ============================================ */
.create-actions {
  margin-top: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  gap: 16px !important;
}

.create-actions .action {
  min-height: 32px !important;
  width: calc(50% - 8px) !important;
  min-width: 0 !important;
  max-width: 200px !important;
  flex: 1 !important;
  padding: 4px 12px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 999px !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

.create-actions .action:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Кнопка Сохранить - стиль как Принять */
.create-actions .action.primary {
  background: rgba(33, 108, 78, 0.45) !important;
  color: #44de9c !important;
}

:root[data-theme="light"] .create-actions .action.primary {
  background: rgba(33, 108, 78, 0.24) !important;
  color: #2a8d67 !important;
}

.create-actions .action.primary:hover {
  background: rgba(33, 108, 78, 0.62) !important;
  color: #7fffd4 !important;
}

:root[data-theme="light"] .create-actions .action.primary:hover {
  background: rgba(33, 108, 78, 0.16) !important;
  color: #2a8d67 !important;
}

/* Кнопка Отменить - стиль как Отклонить */
.create-actions .action.ghost {
  background: rgba(146, 40, 54, 0.35) !important;
  color: #ff7c89 !important;
}

:root[data-theme="light"] .create-actions .action.ghost {
  background: rgba(203, 91, 103, 0.16) !important;
  color: #a94658 !important;
}

.create-actions .action.ghost:hover {
  background: rgba(146, 40, 54, 0.55) !important;
  color: #ff7c89 !important;
}

:root[data-theme="light"] .create-actions .action.ghost:hover {
  background: rgba(203, 91, 103, 0.24) !important;
  color: #a94658 !important;
}

/* Отключаем анимации на странице создания */
.create-page .stake-btn,
.create-page .date-buttons-row .emoji-btn,
.create-page .action {
  transition: none !important;
  animation: none !important;
}

.create-page .stake-btn:active,
.create-page .date-buttons-row .emoji-btn:active {
  transform: none !important;
}

/* ============================================
   КАРТОЧКИ СПОРОВ
   ============================================ */
.cards-content {
  display: grid;
  gap: 10px;
  transition: none !important;
}

.dispute-list {
  display: grid;
  gap: 12px;
  transition: none !important;
}

.dispute-card {
  display: grid;
  grid-template-columns: 4px 1fr;
  border-radius: 18px;
  background: rgb(20, 20, 20);
  border: 1px solid transparent;
  box-shadow: 0 14px 30px rgba(5, 9, 20, 0.36), inset 0 1px 0 rgba(148, 173, 237, 0.12);
  overflow: hidden;
}

.dispute-card:hover {
  border-color: var(--card-status-color, var(--line-strong));
}

:root[data-theme="light"] .dispute-card {
  background: linear-gradient(180deg, #eef2fb 0%, #e5ebf8 100%);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(99, 120, 167, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] .dispute-card:hover {
  border-color: var(--card-status-color, var(--line-strong));
}

.status-strip {
  width: 4px;
}

.dispute-body {
  padding: 20px 18px 18px;
}

.dispute-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.status-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.dispute-type-line,
.status-tag,
.dispute-description,
.dispute-stake-line,
.dispute-deadline-line,
.dispute-participants-line,
.dispute-meta {
  font-size: 16px;
}

.dispute-type-line {
  color: var(--muted);
  font-weight: 400;
}

.dispute-top {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.dispute-title {
  margin: 0;
  font-size: 29px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.04;
}

.status-tag {
  font-weight: 400;
  background: transparent;
  line-height: 1;
  text-align: right;
}

.dispute-meta {
  margin-top: 12px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.dispute-description {
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

:root[data-theme="dark"] .dispute-description {
  border-bottom: 1px solid rgba(125, 115, 255, 0.15);
  margin: 8px -18px 12px -18px;
  padding: 0 18px 12px 18px;
}

:root[data-theme="light"] .dispute-description {
  border-bottom: 1px solid rgba(98, 100, 234, 0.15);
  margin: 8px -18px 12px -18px;
  padding: 0 18px 12px 18px;
}

.dispute-info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
  row-gap: 12px;
  margin-top: 4px;
}

.dispute-participants-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.dispute-participant-invited.is-pending {
  color: var(--pending);
}

.dispute-participant-invited.is-in-progress {
  color: var(--in-progress);
  font-weight: 500;
}

/* ============================================
   КНОПКИ НА КАРТОЧКАХ - ЕДИНЫЙ РАЗМЕР
   ============================================ */
.card-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.card-actions .chip-btn {
  min-width: 150px;
  width: 150px;
  min-height: 42px;
  padding: 9px 12px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions.owner-open-actions {
  display: flex;
  visibility: hidden;
  pointer-events: none;
}

.dispute-card:hover .card-actions.owner-open-actions {
  visibility: visible;
  pointer-events: auto;
}

.card-actions.in-progress-actions {
  visibility: hidden;
  pointer-events: none;
}

.dispute-card:hover .card-actions.in-progress-actions {
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .card-actions .chip-btn {
    width: 130px;
    min-width: 130px;
    font-size: 13px;
    padding: 9px 8px;
    white-space: normal;
    line-height: 1.3;
  }
}

/* Кнопки в панели редактирования */
.edit-actions .chip-btn {
  width: 150px;
}

/* ============================================
   КНОПКИ-ЧИПЫ (ОСНОВНЫЕ СТИЛИ)
   ============================================ */
.chip-btn {
  border: 0;
  outline: none;
  border-radius: 999px;
  min-height: 42px;
  padding: 9px 18px;
  font-size: 16px;
  transition: filter 0.22s ease, background-color 0.22s ease, color 0.22s ease;
  box-shadow: none;
  cursor: pointer;
}

.chip-btn:hover {
  transform: none;
  box-shadow: none;
  filter: contrast(1.2);
}

.chip-btn.soft {
  background: linear-gradient(180deg, #e9efff, #d9e4ff);
  color: #285aaf;
}

:root[data-theme="dark"] .chip-btn.soft {
  background: linear-gradient(180deg, #1b2a4d, #15213d);
  color: #73b0ff;
}

.chip-btn.soft.edit-btn {
  background: #f3bf7f;
  color: #3a250c;
}

:root[data-theme="light"] .chip-btn.soft.edit-btn {
  background: rgba(236, 168, 70, 0.18);
  color: #9f6418;
}

:root[data-theme="light"] .chip-btn.soft.edit-btn:hover {
  background: rgba(236, 168, 70, 0.26);
  color: #9f6418;
  filter: none;
}

:root[data-theme="dark"] .chip-btn.soft.edit-btn {
  background: rgb(95, 76, 26);
  color: rgb(245, 186, 50);
}

:root[data-theme="dark"] .chip-btn.soft.edit-btn:hover {
  background: rgb(120, 96, 32);
  color: rgb(255, 210, 100);
  filter: none;
}

.chip-btn.warn {
  background: rgba(146, 40, 54, 0.35);
  color: #ff7c89;
}

:root[data-theme="dark"] .chip-btn.warn.delete-btn {
  background: rgb(70, 42, 48);
  color: rgb(204, 87, 91);
}

:root[data-theme="dark"] .chip-btn.warn.delete-btn:hover {
  background: rgb(90, 54, 62);
  color: rgb(224, 101, 106);
  filter: none;
}

:root[data-theme="light"] .chip-btn.warn.delete-btn {
  background: rgba(203, 91, 103, 0.16);
  color: #a94658;
}

:root[data-theme="light"] .chip-btn.warn.delete-btn:hover {
  background: rgba(203, 91, 103, 0.24);
  color: #a94658;
  filter: none;
}

:root[data-theme="dark"] .chip-btn.soft.opponent-btn {
  background: rgba(115, 176, 255, 0.1);
  color: #73b0ff;
}

:root[data-theme="dark"] .chip-btn.soft.opponent-btn:hover {
  background: rgba(115, 176, 255, 0.22);
  color: #a3d1ff;
  filter: none;
}

:root[data-theme="light"] .chip-btn.soft.opponent-btn {
  background: rgba(98, 100, 234, 0.08);
  color: #4d52c5;
}

:root[data-theme="light"] .chip-btn.soft.opponent-btn:hover {
  background: rgba(98, 100, 234, 0.18);
  color: #4d52c5;
  filter: none;
}

/* Зелёные кнопки (Принять, Сохранить) */
:root[data-theme="dark"] .chip-btn.soft.opponent-btn.accept-btn {
  background: rgba(33, 108, 78, 0.45);
  color: #44de9c;
}

:root[data-theme="dark"] .chip-btn.soft.opponent-btn.accept-btn:hover {
  background: rgba(33, 108, 78, 0.62);
  color: #7fffd4;
  filter: none;
}

:root[data-theme="light"] .chip-btn.soft.opponent-btn.accept-btn {
  background: rgba(33, 108, 78, 0.24);
  color: #2a8d67;
}

:root[data-theme="light"] .chip-btn.soft.opponent-btn.accept-btn:hover {
  background: rgba(33, 108, 78, 0.16);
  color: #2a8d67;
  filter: none;
}

:root[data-theme="light"] .edit-actions .chip-btn.soft.opponent-btn.accept-btn {
  background: rgba(33, 108, 78, 0.24) !important;
  color: #2a8d67 !important;
}

:root[data-theme="light"] .edit-actions .chip-btn.soft.opponent-btn.accept-btn:hover {
  background: rgba(33, 108, 78, 0.16) !important;
  color: #2a8d67 !important;
  filter: none !important;
}

/* Кнопка "Да, принять" */
:root[data-theme="dark"] .chip-btn.soft.opponent-btn.accept-btn.confirm-btn {
  background: rgba(33, 108, 78, 0.45);
  color: #44de9c;
}

:root[data-theme="dark"] .chip-btn.soft.opponent-btn.accept-btn.confirm-btn:hover {
  background: rgba(33, 108, 78, 0.62);
  color: #7fffd4;
  filter: none;
}

:root[data-theme="light"] .chip-btn.soft.opponent-btn.accept-btn.confirm-btn {
  background: rgba(33, 108, 78, 0.24);
  color: #2a8d67;
}

:root[data-theme="light"] .chip-btn.soft.opponent-btn.accept-btn.confirm-btn:hover {
  background: rgba(33, 108, 78, 0.16);
  color: #2a8d67;
  filter: none;
}

.chip-btn.confirm-btn,
.chip-btn.confirm-btn:hover,
.chip-btn.confirm-btn:focus,
.chip-btn.confirm-btn:active {
  transition: none;
  box-shadow: none;
  transform: none;
  filter: none;
  cursor: pointer;
}

/* ============================================
   ПАНЕЛЬ ОППОНЕНТА
   ============================================ */
.opponent-panel {
  margin-top: 16px;
  padding: 0;
  background: transparent;
  width: 100%;
  max-width: 100%;
}

/* Обёртка для поиска */
.opponent-search-wrap {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  background: var(--surface-soft);
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
  overflow: hidden;
}

/* Иконка лупы слева */
.opponent-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}

/* Поле ввода */
.opponent-search-input {
  width: 100%;
  min-height: 36px;
  height: 36px;
  padding: 0 32px 0 36px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

/* Кнопка очистки справа */
.opponent-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(115, 176, 255, 0.2);
  color: #73b0ff;
  font-size: 12px;
  cursor: pointer;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.opponent-search-wrap.has-value .opponent-search-clear {
  opacity: 1;
  visibility: visible;
}

/* Список пользователей */
.user-list {
  display: grid;
  gap: 4px;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: 16px;
  border: 1px solid var(--line);
}

/* Строка пользователя */
.user-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.user-row:hover {
  background: var(--surface);
}

.user-row.selected {
  background: rgba(115, 176, 255, 0.15);
  color: #73b0ff;
}

.user-row-name {
  flex: 1;
}

/* Кнопки действий в панели оппонента */
.opponent-panel .card-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 0;
}

.opponent-panel .card-actions .chip-btn {
  min-width: 120px;
  width: 120px;
  padding: 8px 12px;
  font-size: 14px;
}

/* Пустое состояние */
.opponent-search-empty {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ============================================
   СВЕТЛАЯ ТЕМА ДЛЯ ПАНЕЛИ ОППОНЕНТА
   ============================================ */
:root[data-theme="light"] .opponent-search-wrap {
  background: #ffffff;
  border-color: #d8e0f3;
}

:root[data-theme="light"] .opponent-search-input {
  color: #20273a;
}

:root[data-theme="light"] .opponent-search-input::placeholder {
  color: #a0a8bc;
}

:root[data-theme="light"] .opponent-search-icon {
  color: #a0a8bc;
}

:root[data-theme="light"] .opponent-search-clear {
  background: rgba(98, 100, 234, 0.15);
  color: #4d52c5;
}

:root[data-theme="light"] .user-list {
  background: #ffffff;
  border-color: #d8e0f3;
}

:root[data-theme="light"] .user-row:hover {
  background: #f0f2f9;
}

:root[data-theme="light"] .user-row.selected {
  background: rgba(98, 100, 234, 0.12);
  color: #4d52c5;
}

:root[data-theme="light"] .opponent-search-empty {
  color: #a0a8bc;
}

/* ============================================
   МОБИЛЬНАЯ АДАПТАЦИЯ ПАНЕЛИ ОППОНЕНТА
   ============================================ */
@media (max-width: 640px) {
  .opponent-search-input {
    min-height: 32px;
    height: 32px;
    font-size: 13px;
    padding: 0 28px 0 32px;
  }
  
  .opponent-search-icon {
    font-size: 12px;
    left: 10px;
  }
  
  .opponent-search-clear {
    width: 18px;
    height: 18px;
    font-size: 10px;
    right: 6px;
  }
  
  .user-row {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .opponent-panel .card-actions .chip-btn {
    min-width: 100px;
    width: 100px;
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* ============================================
   ПАНЕЛЬ РЕДАКТИРОВАНИЯ
   ============================================ */
.edit-panel-inline {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

.edit-panel-inline .dispute-description {
  border-bottom: none !important;
  margin: 0 !important;
  padding: 4px 0 !important;
}

.edit-category-line {
  margin-bottom: 8px;
}

/* ============================================
   ПРОГРЕСС ПАНЕЛЬ (ЗАВЕРШЕНИЕ СПОРА)
   ============================================ */
.progress-panel {
  margin-top: 12px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.progress-people {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.progress-panel.is-decision-mode .progress-people {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 50%;
  min-width: 360px;
  margin: 0 auto;
}

.progress-panel.is-decision-mode .progress-person.selectable,
.progress-panel.is-decision-mode .progress-center.selectable {
  background: rgba(115, 176, 255, 0.1);
  color: #73b0ff;
  min-height: 42px;
  border-radius: 999px;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.progress-panel.is-decision-mode .progress-person.selectable.selected,
.progress-panel.is-decision-mode .progress-center.selectable.selected {
  background: rgba(115, 176, 255, 0.2);
}

/* ============================================
   СТАТУСЫ
   ============================================ */
.status-open { color: var(--open); }
.status-pending { color: var(--pending); }
.status-in-progress { color: var(--in-progress); }
.status-cancelled { color: var(--cancelled); }
.status-finished { color: var(--finished); }

.empty {
  text-align: center;
  font-size: 24px;
  color: var(--muted);
  padding: 28px 0;
}

/* ============================================
   ЗАПРЕЩАЕМ АНИМАЦИИ ПЕРЕХОДОВ
   ============================================ */
.page,
.page-topbar,
.cards-content,
.dispute-list {
  transition: none !important;
}

body {
  overflow-y: scroll;
}

/* ============================================
   МЕДИА-ЗАПРОСЫ
   ============================================ */
@media (max-width: 980px) {
  .block-title { font-size: 30px; }
  .dispute-title { font-size: 34px; }
}

@media (max-width: 820px) {
  .emoji-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deadline-layout { flex-direction: column; align-items: center; gap: 32px; }
  .left-column, .right-column { width: 100%; max-width: 280px; }
  .date-buttons-row { flex-direction: row; gap: 12px; }
  .date-buttons-row .emoji-btn { width: 100%; flex: 1; }
  .create-block .block-title { font-size: 25px; }
  .carousel-text, .home-actions { margin-top: 24px; }
  .create-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispute-title { font-size: 30px; }
  .chip-btn { font-size: 14px; }
  .progress-people { grid-template-columns: 1fr; text-align: center; }
  .progress-panel.is-decision-mode .progress-people { min-width: auto; width: 100%; }
  .user-list { width: 100%; }
}