:root{--bg:#080b10;--panel:#101722;--line:#263244;--text:#f5f7fa;--muted:#8d9bad;--accent:#48b9ff;--green:#54e58a}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 70% 0,#142436 0,#080b10 40%);color:var(--text);font-family:Inter,Arial,sans-serif}
a{color:inherit;text-decoration:none}.top{height:72px;display:flex;align-items:center;justify-content:space-between;max-width:1180px;margin:auto;padding:0 22px;border-bottom:1px solid #ffffff10}.logo{font-weight:900;font-size:25px;letter-spacing:2px}.logo span{color:var(--accent)}nav{display:flex;gap:24px;color:var(--muted)}
main{min-height:80vh}.hero{max-width:1040px;margin:70px auto 0;padding:0 22px}.eyebrow{color:var(--accent);font-size:12px;font-weight:800;letter-spacing:3px}.hero>h1{font-size:clamp(42px,8vw,88px);line-height:.92;margin:16px 0 36px;letter-spacing:-4px}
.event-card,.panel,.empty{background:#101722dd;border:1px solid var(--line);border-radius:18px;padding:28px;box-shadow:0 30px 80px #0006}.event-top{display:flex;justify-content:space-between;gap:20px}.event-top h2{font-size:30px;margin:10px 0}.live{color:var(--green);font-size:12px;font-weight:800}.free{border:1px solid #54e58a55;color:var(--green);padding:8px 12px;border-radius:99px;height:max-content;font-weight:800}.facts{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);border:1px solid var(--line);margin:20px 0}.facts div{background:#0c121b;padding:18px}.facts small{display:block;color:var(--muted);font-size:10px;margin-bottom:7px}.stats{color:var(--muted);margin:20px 0}.stats b{color:white}.join,button{display:inline-block;background:var(--accent);color:#00111d;border:0;padding:15px 22px;border-radius:8px;font-weight:900;cursor:pointer}.note{color:var(--muted);font-size:12px}.section,.page,.admin{max-width:1040px;margin:55px auto;padding:0 22px}.section h2,.page h1{font-size:34px}.chips{display:flex;flex-wrap:wrap;gap:8px}.chips span{background:#121b27;border:1px solid var(--line);padding:8px 12px;border-radius:99px}.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.steps div{padding:22px;background:#0e151f;border:1px solid var(--line);border-radius:12px}.steps b{color:var(--accent);font-size:28px}.steps p,.page p{color:#b2bdca;line-height:1.65}.page{max-width:820px}.page h2{margin-top:36px}.admin{max-width:1100px}.panel{margin:20px 0}.panel form{display:flex;flex-wrap:wrap;gap:8px}.panel input,.panel select{background:#090e15;color:white;border:1px solid var(--line);padding:11px;border-radius:7px}.admin-event{display:flex;flex-direction:column;gap:10px;padding:18px 0;border-top:1px solid var(--line)}footer{max-width:1040px;margin:80px auto 0;padding:30px 22px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:var(--muted)}
@media(max-width:760px){.facts,.steps{grid-template-columns:1fr 1fr}.hero{margin-top:40px}.hero>h1{letter-spacing:-2px}.event-card{padding:18px}.top nav{gap:12px}.admin form{flex-direction:column}.admin input,.admin select,.admin button{width:100%}}
@media(max-width:460px){.facts,.steps{grid-template-columns:1fr}.event-top{flex-direction:column}.hero>h1{font-size:46px}}

.language-select select{background:#0c121b;color:var(--text);border:1px solid var(--line);border-radius:7px;padding:8px 10px;max-width:190px}
html[dir=rtl] body{text-align:right}html[dir=rtl] .event-top,html[dir=rtl] footer,html[dir=rtl] .facts,html[dir=rtl] .steps{direction:rtl}
@media(max-width:760px){.top{height:auto;min-height:72px;padding-top:12px;padding-bottom:12px}.top nav{align-items:center;flex-wrap:wrap;justify-content:flex-end}.language-select select{max-width:145px}}
/* PATCH 02 — profile */
.profile-wrap{max-width:760px;margin:0 auto;padding:42px 18px 70px}.profile-card{background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.1);border-radius:20px;padding:28px}.profile-card h1{margin:5px 0 24px;font-size:clamp(28px,5vw,44px)}.eyebrow{font-size:12px;letter-spacing:.18em;opacity:.6}.profile-notice,.connections{padding:20px 0}.profile-notice h2,.connections h2{margin:0 0 8px}.profile-notice p{opacity:.75;line-height:1.55}.profile-form{display:grid;gap:17px}.profile-form label{display:grid;gap:7px}.profile-form label>span{font-weight:700}.profile-form input,.profile-form select{width:100%;box-sizing:border-box;background:#101319;color:inherit;border:1px solid rgba(255,255,255,.15);border-radius:10px;padding:13px 14px;font:inherit}.profile-form small{opacity:.55;line-height:1.4}.profile-save{border:0;border-radius:10px;padding:14px 18px;font-weight:800;cursor:pointer}.connect-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:15px}.connect-card{border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;display:flex;justify-content:space-between;gap:12px}.connect-card span{opacity:.65}.flash{padding:12px 14px;border-radius:10px;margin:0 0 18px}.flash.success{background:rgba(70,190,110,.14)}.flash.error{background:rgba(220,70,70,.14)}.logout-form{margin-top:24px}.logout-form button{background:none;color:inherit;border:1px solid rgba(255,255,255,.15);border-radius:9px;padding:9px 14px;cursor:pointer}@media(max-width:650px){.profile-card{padding:20px 16px}.connect-grid{grid-template-columns:1fr}.top nav{gap:8px;flex-wrap:wrap}}

/* Lobbies table */
.lobbies-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  overflow: hidden;
}
.lobbies-table th, .lobbies-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 14px;
}
.lobbies-table th {
  color: var(--muted, #93a0b4);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: rgba(0,0,0,.2);
}
.lobbies-table tr:last-child td { border-bottom: 0; }
.lobbies-table tr:hover td { background: rgba(255,255,255,.02); }
.lobbies-table a { color: inherit; text-decoration: none; }
.lobbies-table a:hover { text-decoration: underline; }

.btn-join, .btn-tg, .btn-vk-disabled {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-join { background: #e74c3c; color: #fff; }
.btn-join:hover { opacity: .85; }
.btn-tg { background: #229ED9; color: #fff; margin-right: 6px; }
.btn-tg:hover { opacity: .85; }
.btn-vk-disabled { background: #333; color: #666; cursor: not-allowed; }
.badge-joined { display: inline-block; padding: 6px 14px; background: #143a1f; color: #2ecc71; border-radius: 8px; font-size: 13px; }

/* ============================================================
   Lobby tables (lobbies + participant)
   ============================================================ */
.lobbies-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: linear-gradient(180deg, rgba(22,27,37,.9), rgba(14,17,23,.9));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  font-size: 14px;
}

.lobbies-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #93a0b4;
  background: rgba(0,0,0,.25);
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}

.lobbies-table tbody td {
  padding: 14px 16px;
  color: #e6ecf3;
  border-bottom: 1px solid rgba(255,255,255,.05);
  vertical-align: middle;
}

.lobbies-table tbody tr:last-child td { border-bottom: 0; }

.lobbies-table tbody tr {
  transition: background .15s ease, transform .15s ease;
}
.lobbies-table tbody tr:hover td {
  background: rgba(231,76,60,.06);
}
.lobbies-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 #e74c3c;
}

/* Ссылка-название лобби */
.lobbies-table td a {
  color: #e6ecf3;
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.lobbies-table td a:hover {
  color: #e74c3c;
  text-decoration: none;
}

/* Бейдж статуса — LIVE / OPEN */
.lobbies-table .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  background: rgba(46,204,113,.12);
  color: #2ecc71;
  border: 1px solid rgba(46,204,113,.35);
}
.lobbies-table .live::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
  animation: livePulse 1.4s infinite;
}
@keyframes livePulse {
  0%,100% { opacity: 1; }
  50% { opacity: .35; }
}

/* Счётчик игроков */
.lobbies-table .players {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #cdd7e3;
}

/* Кнопка "Участвовать" в таблице */
.btn-join {
  display: inline-block;
  padding: 8px 18px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s, box-shadow .12s, filter .12s;
  box-shadow: 0 4px 14px rgba(231,76,60,.35);
}
.btn-join:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(231,76,60,.5);
}
.btn-join:active { transform: translateY(0); }

/* Кнопка "Подтвердить через TG" */
.btn-tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #229ED9, #1c82b3);
  color: #fff !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 4px 14px rgba(34,158,217,.35);
}
.btn-tg::before { content: "✈"; font-size: 14px; }
.btn-tg:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(34,158,217,.5); }

/* Кнопка ВК — disabled placeholder */
.btn-vk-disabled {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,.04);
  color: #6b7686;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: not-allowed;
  white-space: nowrap;
}
.btn-vk-disabled::before { content: "🔒"; font-size: 12px; }

/* Бейдж "Ты участвуешь" */
.badge-joined {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(46,204,113,.12);
  color: #2ecc71 !important;
  border: 1px solid rgba(46,204,113,.4);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   Responsive: на мобильных таблица превращается в карточки
   ============================================================ */
@media (max-width: 720px) {
  .lobbies-table thead { display: none; }
  .lobbies-table, .lobbies-table tbody,
  .lobbies-table tr, .lobbies-table td { display: block; width: 100%; }
  .lobbies-table {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-spacing: 0;
  }
  .lobbies-table tbody tr {
    background: linear-gradient(180deg, rgba(22,27,37,.95), rgba(14,17,23,.95));
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  .lobbies-table tbody td {
    border: 0;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .lobbies-table tbody td::before {
    content: attr(data-label);
    color: #93a0b4;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
  }
  .lobbies-table tbody tr:hover td:first-child { box-shadow: none; }
  .btn-join, .btn-tg, .btn-vk-disabled, .badge-joined { width: 100%; justify-content: center; }
}

/* Пустое состояние */
.empty {
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(22,27,37,.6), rgba(14,17,23,.6));
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: 14px;
  color: #93a0b4;
}
.empty h2 { color: #e6ecf3; margin: 0 0 8px; font-size: 18px; }

/* Кнопка "Отменить участие" */
.btn-leave {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: #e6ecf3;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-leave::before { content: "✕"; font-size: 12px; opacity: .7; }
.btn-leave:hover {
  background: rgba(231,76,60,.1);
  border-color: rgba(231,76,60,.5);
  color: #e74c3c;
}

/* Кликабельные карточки входа в блоке "Войдите" */
.connect-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.connect-link b { color: #e6ecf3; font-size: 15px; }
.connect-link span { color: #93a0b4; font-size: 13px; }
.connect-link:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.connect-link.auth-telegram:hover { border-color: #229ED9; }
.connect-link.auth-vk:hover { border-color: #4a76a8; }

/* Таймер до старта лобби */
.countdown-wrap {
  margin: 14px 0 6px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(231,76,60,.12), rgba(231,76,60,.04));
  border: 1px solid rgba(231,76,60,.35);
  border-radius: 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.countdown-wrap small {
  color: #93a0b4;
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
  font-weight: 600;
}
.countdown {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  color: #e74c3c;
  text-shadow: 0 0 20px rgba(231,76,60,.5);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.countdown.done {
  color: #2ecc71;
  font-size: 16px;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(46,204,113,.4);
}
@media (max-width: 600px) {
  .countdown { font-size: 22px; letter-spacing: 1px; }
}

/* Активная кнопка "Подтвердить через ВК" */
.btn-vk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #4a76a8, #3a5f88);
  color: #fff !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 4px 14px rgba(74,118,168,.35);
  margin-left: 6px;
}
.btn-vk::before { content: "VK"; font-weight: 700; font-size: 11px;
                  background: rgba(255,255,255,.2); padding: 1px 5px;
                  border-radius: 4px; }
.btn-vk:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(74,118,168,.5); }

/* CTA-строка: таймер + кнопка Участвовать */
.cta-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0 6px;
}
.cta-row .countdown-wrap {
  margin: 0;
  flex-shrink: 0;
  min-height: 62px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
}
.cta-row .join-cta {
  flex: 1 1 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  text-align: center;
  padding: 0 24px;
  margin: 0;
  min-height: 62px;
}
@media (max-width: 540px) {
  .cta-row { flex-direction: column; }
  .cta-row .join-cta { min-height: 52px; }
  .cta-row .countdown-wrap { min-height: 52px; padding: 6px 14px; }
}

/* PATCH: mobile CTA fix */
@media (max-width: 540px) {
  .cta-row { flex-direction: column; gap: 10px; }
  .cta-row .countdown-wrap {
    width: 100%;
    min-height: 48px;
    padding: 6px 14px;
  }
  .cta-row .join-cta {
    flex: 0 0 auto;      /* убираем растяжку по высоте */
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* PATCH: mobile action buttons — переносим в столбик */
@media (max-width: 720px) {
  .lobbies-table td[data-label] {
    flex-wrap: wrap;
  }
  .lobbies-table td[data-label] .btn-tg,
  .lobbies-table td[data-label] .btn-vk,
  .lobbies-table td[data-label] .btn-vk-disabled,
  .lobbies-table td[data-label] .btn-join,
  .lobbies-table td[data-label] .btn-leave,
  .lobbies-table td[data-label] .badge-joined {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin: 4px 0 0 0;
  }
  .lobbies-table td[data-label] form {
    display: block !important;
    width: 100%;
    margin: 4px 0 0 0 !important;
  }
  .lobbies-table td[data-label=""] {
    display: block;
  }
}

/* PATCH: sticky header + language near logo */
.top {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(8,12,18,.85);
  padding-left: 22px;
  padding-right: 22px;
}
.top .logo {
  flex-shrink: 0;
}
.top .language-select {
  margin-left: 14px;
  margin-right: auto;
}
.top .language-select select {
  max-width: 150px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .top {
    padding: 10px 14px;
  }
  .top .language-select {
    order: 10;
    margin: 6px 0 0 0;
    width: 100%;
  }
  .top .language-select select {
    max-width: none;
    width: 100%;
  }
  .top nav {
    order: 5;
    flex: 1 1 auto;
    justify-content: flex-end;
  }
}

/* PATCH: mobile header — nav сверху, лого+язык ниже */
@media (max-width: 760px) {
  .top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }
  .top nav {
    order: 1;               /* ссылки — первыми */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    width: 100%;
  }
  .top .logo {
    order: 2;               /* лого ниже */
    text-align: center;
    margin: 0 auto;
  }
  .top .language-select {
    order: 3;
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .top .language-select select {
    max-width: none;
    width: 100%;
  }
}

/* PATCH: mobile header — nav сверху, лого+язык одной строкой */
@media (max-width: 760px) {
  .top {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }
  .top nav {
    order: 1;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }
  .top .logo {
    order: 2;
    flex: 0 0 auto;
    margin: 4px 0 0 0;
  }
  .top .language-select {
    order: 3;
    flex: 1 1 auto;
    margin: 4px 0 0 10px;
    min-width: 0;
  }
  .top .language-select select {
    max-width: none;
    width: 100%;
  }
}

/* PATCH: mobile header — лого + язык строго в одну строку */
@media (max-width: 760px) {
  .top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }
  .top nav {
    order: 1;
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }
  .top .logo {
    order: 2;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .top .language-select {
    order: 3;
    flex: 1 1 0;
    min-width: 0;
    margin: 0 0 0 10px;
    display: block;
  }
  .top .language-select select {
    max-width: none;
    width: 100%;
  }
}

/* PATCH: mobile header — все ссылки в одну строку */
@media (max-width: 760px) {
  .top nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 6px;
    width: 100%;
    overflow-x: auto;
  }
  .top nav a {
    flex: 1 1 0;
    min-width: 0;
    display: block;
    text-align: center;
    padding: 8px 4px;
    background: #121b27;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 11px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* PATCH: mobile header — лого+язык сверху, nav внизу */
@media (max-width: 760px) {
  .top .logo { order: 1; }
  .top .language-select { order: 2; }
  .top nav { order: 3; }
}

/* Страница истории лобби */
.history-table .finished-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(255,255,255,.06);
  color: #93a0b4;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.history-table .prize-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(243,156,18,.4);
}
.history-table td a {
  color: #cdd7e3;
  text-decoration: none;
}
.history-table td a:hover { color: #e74c3c; text-decoration: none; }
.history-table tbody tr:hover td { background: rgba(46,204,113,.04); }
.history-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #2ecc71; }

/* PATCH: уменьшаем H1 на главной в 2 раза */
.hero > h1 {
  font-size: clamp(18px, 3.5vw, 36px) !important;
  letter-spacing: -0.5px !important;
  margin: 12px 0 !important;
}
@media (max-width: 760px) {
  .hero > h1 {
    font-size: 24px !important;
    letter-spacing: -0.5px !important;
  }
}
@media (max-width: 460px) {
  .hero > h1 {
    font-size: 20px !important;
    letter-spacing: -0.3px !important;
  }
}

/* PATCH: футер закреплён внизу экрана */
footer {
  position: sticky !important;
  bottom: 0;
  z-index: 50;
  background: rgba(8,12,18,.92) !important;
  backdrop-filter: blur(8px);
  padding: 14px 22px !important;
  margin-top: auto !important;
  border-top: 1px solid var(--line);
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1 1 auto;
}
@media (max-width: 760px) {
  footer {
    padding: 10px 14px !important;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* PATCH FIX: откат flex-body + футер sticky правильно */
body {
  display: block !important;
  min-height: 100vh;
  padding-bottom: 70px; /* высота футера, чтобы контент не заезжал под него */
}

footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 12px 22px !important;
  z-index: 50;
  background: rgba(8,12,18,.94) !important;
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

footer > b,
footer > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

footer > span {
  text-align: right;
}

@media (max-width: 760px) {
  body { padding-bottom: 64px; }
  footer {
    padding: 10px 14px !important;
    font-size: 12px;
    gap: 8px;
  }
  footer > b { font-size: 13px; }
  footer > span { font-size: 11px; }
}
