body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
}

header {
    width: 100%;
    padding: 10px 0;
    text-align: center;
    background-color: #1a1a1a;
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
}

.nav-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 10px;
    font-size: 14px;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 5px;
    text-decoration: none;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.nav-btn:hover {
    background-color: #fff;
    color: #000;
}

.container {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
    text-align: center;
    width: 600px;
    height: 400px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 20px auto;
}

h1, h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
}

p {
    font-size: 16px;
    margin: 10px 0;
    color: #fff;
}

.content {
    width: 80%;
    margin: 20px auto 60px auto;
    text-align: left;
}

.input-group {
    display: flex;
    align-items: center;
    margin: 8px 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.input-group input {
    padding: 8px;
    font-size: 16px;
    border-radius: 5px 0 0 5px;
    border: 1px solid #ccc;
    border-right: none;
    width: 60%;
    height: 36px;
    box-sizing: border-box;
    background-color: #333;
    color: #fff;
}

.input-group select {
    padding: 8px;
    font-size: 16px;
    border-radius: 0 5px 5px 0;
    border: 1px solid #ccc;
    width: 40%;
    height: 36px;
    box-sizing: border-box;
    background-color: #333;
    color: #fff;
}

label {
    display: block;
    margin: 6px 0 3px;
    font-size: 14px;
    color: #fff;
}

#rate, #minAmount {
    font-size: 16px;
    margin: 6px 0;
    color: #fff;
}

.error {
    color: #ff4d4d;
    font-size: 12px;
    margin: 3px 0 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.create-order-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-top: 6px;
    font-size: 14px;
    border-radius: 5px;
    border: none;
    color: #fff;
    background-color: #28a745;
    cursor: pointer;
}

.create-order-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.exchange-form, .contact-form, .confirm-form {
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
    top: 20px;
    width: 100%;
    height: calc(100% - 80px);
    box-sizing: border-box;
}

.exchange-form.hidden, .contact-form.hidden, .confirm-form.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.exchange-form.visible, .contact-form.visible, .confirm-form.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.contact-form input, .confirm-form input {
    width: 80%;
    padding: 8px;
    margin: 4px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #333;
    color: #fff;
}

.back-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    border: none;
    color: #fff;
    background-color: #007bff;
    cursor: pointer;
}

.continue-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    border: none;
    color: #fff;
    background-color: #28a745;
    cursor: pointer;
}

.continue-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.button-group {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    width: 80%;
    justify-content: center;
    z-index: 20;
}

.confirm-form p {
    font-size: 14px;
    margin: 6px 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    padding: 0;
    color: #fff;
}

.confirm-form label {
    font-size: 14px;
    text-align: left;
    width: 80%;
    margin: 6px auto;
    display: flex;
    align-items: center;
    padding: 0;
    color: #fff;
}

.checkbox-group {
    position: absolute;
    bottom: 60px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 100px;
    z-index: 15;
}

.checkbox-group label {
    font-size: 14px;
    width: 100%;
    margin: 6px 0;
    display: flex;
    align-items: center;
    text-align: left;
    color: #fff;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    flex-shrink: 0;
}

.checkbox-group label span {
    margin-left: 10px;
}

.checkbox-group label span a {
    color: #4da8ff;
    text-decoration: none;
}

.checkbox-group label span a:hover {
    text-decoration: underline;
}

.copy-btn {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 5px;
    border: none;
    color: #fff;
    background-color: #007bff;
    cursor: pointer;
}

.copy-btn:hover {
    background-color: #0056b3;
}

.copy-feedback {
    font-size: 14px;
    color: #28a745;
    margin-left: 10px;
    display: none;
}

.copy-feedback.show {
    display: inline;
}

.done-btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    border: none;
    color: #fff;
    background-color: #28a745;
    cursor: pointer;
}

.done-btn:hover {
    background-color: #218838;
}

.done-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.confirmation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.confirmation p {
    font-size: 16px;
    margin: 20px 0;
    text-align: center;
    width: 80%;
    color: #fff;
}

.confirmation a {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    border: none;
    color: #fff;
    background-color: #28a745;
    text-decoration: none;
    cursor: pointer;
}

.confirmation a:hover {
    background-color: #218838;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

a {
    color: #4da8ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === Sticky (fixed) footer === */
.footer {
  position: fixed;        /* закрепляем у низа окна */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: #111;
  border-top: 1px solid #222;
  padding: 18px 16px;     /* сделал уже */
  color: #ccc;
  box-shadow: 0 -10px 30px rgba(0,0,0,.25);
}

.footer-container {
  max-width: 960px;       /* уже контейнер */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.footer-left .footer-logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff;            /* белый логотип */
  margin: 0 0 8px 0;
}

.footer-telegram {
  display: inline-block;
  background: #1a1a1a;
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
}

.footer-right {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-column h3 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px 0;
}

.footer-column a {
  display: block;
  color: #bbb;
  text-decoration: none;
  margin: 4px 0;
}
.footer-column a:hover { color: #fff; }

/* Чтобы контент не “заезжал” под фиксированный футер */
body { padding-bottom: 80px; }  /* регулируй по фактической высоте футера */
@media (max-width: 600px) {
  body { padding-bottom: 100px; }
}

/* === Центрируем текст под инпутом (minAmount) === */
#minAmount {
  text-align: center;
  width: 100%;
  display: block;
  margin-top: 8px;
}

/* Цвет и стиль ошибки */
#minAmount.error {
  color: #ff4d4d;
  font-weight: 600;
}

/* === Красный текст для предупреждения о одинаковой валюте === */
#rate.error {
  color: #ff4d4d; /* ярко-красный */
  font-weight: 600;
  text-align: center;
  width: 100%;
  display: block;
  margin-top: 8px;
}

/* === Унифицированный стиль ошибок === */
.error {
  color: #ff4d4d;         /* ярко-красный цвет */
  font-weight: 600;       /* чуть жирнее для читаемости */
  text-align: center;     /* по центру */
  margin-top: 4px;
  font-size: 14px;
}

/* --- фикс перекрытия кнопок при появлении ошибок --- */

/* Контейнер должен растягиваться по контенту */
.container {
  height: auto !important;
  min-height: 400px; /* сохраним минимальную высоту, как было визуально */
}

/* Формы больше не абсолютно позиционируем — пусть занимают естественную высоту */
.exchange-form,
.contact-form,
.confirm-form {
  position: static !important;
  width: 100%;
  height: auto !important;
  top: auto;
}

/* Кнопки внизу формы — в потоке, а не поверх контента */
.button-group {
  position: static !important;
  left: auto; right: auto; bottom: auto;
  transform: none !important;
  width: 80%;
  margin: 16px auto 0;
  z-index: 1; /* не перекрываем текст */
  justify-content: center;
}

/* Чекбокс-группа тоже в потоке, чтобы не прилипала к низу и не перекрывала */
.checkbox-group {
  position: static !important;
  width: 80%;
  margin: 16px auto 0;
  padding-left: 0 !important;
}

/* Сообщения об ошибках — центр и красный (если нужно) */
.error {
  color: #ff4d4d;
  font-weight: 600;
  text-align: center;
}

/* Центровка чекбокса "Перевод выполнен" */
.checkbox-group {
  display: flex;
  justify-content: center;  /* центрируем горизонтально */
  align-items: center;      /* центрируем вертикально */
  width: 100%;
  margin-top: 20px;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  justify-content: center;  /* чтобы текст и чекбокс были на одной линии */
  gap: 8px;
  color: #fff;
  font-size: 16px;
  text-align: center;
  margin: 0 auto;
  width: fit-content;       /* сузить под контент */
}

