/* === GLOBAL === */
body {
  overflow-x: hidden;
  background-color: black;
  color: white;
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
}

/* Єдина змінна для ширини полів */
:root { 
  --field-width: 92%;
}

/* === HERO BLOCK === */
.fcoin-hero {
  background-image: url('/img/Falatia_shop.webp');
  background-size: cover;
  background-position: center;
  height: 230px;
  width: 80%;
  max-width: 850px;
  margin: 150px auto 30px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}


.fcoin-hero-anim {
  background-image: url('/img/Falatia_shop.webp');
  background-size: cover;
  background-position: center;
  height: 230px;
  width: 80%;
  max-width: 850px;
  margin: 150px auto 30px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}



.bucks-container-anim {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 425px) {
  .bucks-container-anim {
    padding: 20px;
    grid-template-columns: repeat(1, 1fr);
  }
}

.hero-text {
  position: absolute;
  top: 70px;
  left: 30px;
}

.hero-text h1 {
  font-size: 2.5em;
  margin: 0;
  color: #ffffff;
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.8em !important;
  }
}

.hero-text p {
  font-size: 2em;
  color: #ffffff;
  margin-top: 5px;
}

/* === RANK INFO === */
.rank-info {
  text-align: center;
  color: #ccc;
  margin: 30px 0;
  font-size: 1em;
}

.rank-info span {
  text-decoration: underline;
  cursor: pointer;
}

/* === MAIN SECTION === */
/* Базові стилі магазину */
.orbucks-store {
  padding: 40px 20px;
  text-align: center;
}

.bucks-container {
  grid-template-columns: repeat(2, 1fr);
  display: grid;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  max-width: 850px;
  margin: 0 auto;
  margin-top: 20px;
}

.bucks-container_sponsor {
  grid-template-columns: repeat(2, 1fr);
  display: grid;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  max-width: 850px;
  margin: 0 auto;
  margin-top: 20px;
}

@media (max-width: 1028px) {
  .bucks-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 750px;
  }
}


@media (max-width: 720px) {
  .bucks-container {
    display: flex;
  }
}



@media (max-width: 1028px) {
  .bucks-container_sponsor {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 750px;
  }
}


@media (max-width: 720px) {
  .bucks-container_sponsor {
    display: flex;
  }
}



/* Картка спонсорки */
.bucks-box {
  background: #dfbc9e;
  color: #000;
  padding: 13px;
  border-radius: 5px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.bucks-box img {
  /* width: 265px; */
  height: 320px;
}

.bucks-box h3 {
  margin: 10px 0;
  font-size: 1.4em;
}

/* Кнопка купівлі */
.bucks-box button {
  background: #000;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}

.bucks-box button:hover {
  background: #222;
}

/* Додаткові кнопки */
.goto-button {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
  user-select: none;
}

.goto-button:hover {
  background: #222;
}

/* Мітки бонусів */
.bonus-label {
  background: red;
  color: white;
  font-size: 0.8em;
  padding: 3px 8px;
  border-radius: 5px;
  margin: 10px auto 5px;
  display: block;
  width: fit-content;
}

.bonus-none {
  color: white;
  font-size: 0.8em;
  padding: 10px 1px;
  border-radius: 5px;
  margin: 10px auto 5px;
  display: block;
  width: fit-content;
}

/* Іконка інформації */
.info-icon {
  width: 24px;
  height: 24px;
  background-color: #2b2a2a;
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  font-family: Arial, sans-serif;
  font-size: 16px;
  position: absolute;
  top: 10px;
  right: 10px;
  transition: background 0.2s ease;
}

.info-icon:hover {
  background-color: #666;
}

/* Оверлей модального вікна */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  /* показувати через JS */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Вміст модального вікна спонсорки */
.sponsor-modal {
  background: #2c2c2c;
  border-radius: 12px;
  padding: 30px 25px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  font-family: Arial, sans-serif;
  color: #333;
  animation: fadeInScale 0.25s ease-out;
}

/* Анімація появи модалки */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* Банер-попередження */
.store-warning {
  color: #856404;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 20px;
  font-family: Arial, sans-serif;
}

/* Додатково: зробимо кнопки «купити» неактивними */


.bucks-container-anim button {
  pointer-events: none;
  opacity: 0.5;
}




.bucks-container-anim button:disabled {
  background: #777;
  color: #ccc;
  cursor: not-allowed;
}


/* Заголовок модального вікна */
.sponsor-modal h2 {
  margin: 0 0 20px;
  font-size: 1.8em;
  text-align: center;
  color: #f6f6f6;
  /* головний акцент */
  letter-spacing: 0.5px;
}

/* Список переваг */
.features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features li {
  color: whitesmoke;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  line-height: 1.4;
}

.features li::before {
  content: '✔';
  display: inline-block;
  margin-right: 10px;
  color: #1e90ff;
  font-weight: bold;
  font-size: 1.1em;
}

.features li:last-child {
  margin-bottom: 0;
}

/* Кнопка закриття модалки */
.modal-close {
  position: absolute;
  top: 7px;
  right: 16px;
  font-size: 35px;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #333;
}

/* Загальні стилі для модальних вікон */
.modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: hidden;
  font-family: 'Arial', sans-serif;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  /* або block, якщо flex не підходить */
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: #252525;
  margin: 0;
  padding: 30px 40px;
  width: 40%;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(138, 86, 155, 0.8);
  position: relative;
  transition: transform 0.3s ease;
}

@media (min-width: 1024px) {
  .modal-content {
    width: 28%;
  }
}

.close {
  color: #bbb;
  font-size: 36px;
  font-weight: bold;
  position: absolute;
  right: 0px;
  top: -8px;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

h2 {
  text-align: left;
  padding-right: 40px;
  color: #f0e9ff;
  /* світліший фіолетовий */
  position: relative;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 0 0 8px #b899d2aa;
}

.nickname-container {
  border-radius: 8px;
  background-color: #593e5a;
  /* більш насичений фіолетовий */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 15px;
  box-shadow: inset 0 0 10px #7a5290aa;
}

.image-container img {
  width: 170px;
  height: 170px;
  margin-right: 20px;
  border-radius: 8px;
  /* box-shadow: 0 0 15px #9e6bdbcc; */
}

.input-button-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 280px;
  align-items: center;
}

input#nickname,
button#donateButton {
  width: 97%;
  border-radius: 7px;
  transition: box-shadow 0.3s ease;
}

input#nickname {
  background-color: #2a2433;
  padding: 12px 14px;
  font-size: 17px;
  border: 1px solid #7c7194;
  outline: none;
  color: #f0e9ff;
  box-shadow: inset 0 0 8px #6f5a89aa;
}

input#nickname:focus {
  border-color: #b899d2;
  box-shadow: 0 0 10px #b899d2cc;
}

button#donateButton {
  margin-top: 10px;
  background-color: #886ecb;
  color: white;
  padding: 14px 30px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  box-shadow: 0 5px 15px #6a52a0cc;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

button#donateButton:hover {
  background-color: #a18adb;
  box-shadow: 0 7px 20px #7f67beee;
}

.username-info {
  text-align: left;
  margin-top: 25px;
  color: #d8d1e5;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 0 5px #715f8c88;
}

.username-info h3 {
  font-size: 19px;
  color: #e7d9ff;
  margin-bottom: 12px;
  font-weight: 700;
  text-shadow: 0 0 6px #a492c4cc;
}

.username-info p {
  font-size: 15px;
  line-height: 1.7;
}

#error-message {
  display: none;
  background-color: #ff5959;
  color: #fff;
  padding: 14px;
  font-size: 17px;
  border-radius: 8px;
  margin: 12px auto 0;
  text-align: center;
  box-shadow: 0 0 12px #ff5959cc;
  font-weight: 700;
}

#error-message.show {
  display: block;
}



/* Стилі для проміжного модального purposeModal */

/* Основний контейнер модального вікна */
#purposeModal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(13, 13, 14, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  /* блокуємо, поки не показуємо */
  transition: opacity 0.35s ease;
}

#purposeModal.show {
  opacity: 1;
  pointer-events: auto;
  /* даємо можливість кліків */
}

/* Вміст модалки */
#purposeModal .modal-content {
  position: relative;
  background-color: #252525;
  padding: 30px 40px 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(138, 86, 155, 0.8);
  width: 90%;
  max-width: 400px;
  color: #f3e9ff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transform: translateY(-40px);
  opacity: 0;
  animation: fadeSlideUp 0.4s forwards;
  user-select: none;

}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Закриваюча кнопка */
#purposeModal .close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 26px;
  font-weight: 700;
  color: #c7b9d9;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
  pointer-events: auto;
  /* щоб можна було натиснути */
}

#purposeModal .close:hover {
  color: #fff;
}

/* Заголовок */
#purposeModal h2 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px #a993c7cc;
}

/* Підзаголовок */
#purposeModal p {
  font-size: 16px;
  color: #d3c6e4;
  margin-bottom: 30px;
  line-height: 1.4;
  font-weight: 600;
}

/* Варіанти вибору */
.purpose-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 320px;
  margin: 0 auto 32px;
  pointer-events: auto;
  /* ключове */
  position: relative;
  z-index: 10;
}

.purpose-options label {
  display: flex;
  align-items: center;
  background: #5e3b73;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #e7dfff;
  cursor: pointer;
  box-shadow: inset 0 0 8px #9078b8aa;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  position: relative;
  z-index: 20;
  pointer-events: auto;
  /* ключове */
}

.purpose-options label:hover {
  background: #7e59a1;
  box-shadow: inset 0 0 14px #b2a4d7cc;
}

.purpose-options input[type="radio"] {
  margin-right: 16px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #b39ddb;
  position: relative;
  top: 1px;
  z-index: 30;
  pointer-events: auto;
  /* ключове */
  flex-shrink: 0;
}

/* Кнопка підтвердження */
#purposeConfirmBtn {
  display: block;
  margin: 0 auto;
  padding: 14px 38px;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #705896, #432d57);
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow:
    0 6px 20px rgba(104, 88, 131, 0.8),
    inset 0 -5px 16px rgba(132, 92, 167, 0.9);
  transition:
    background 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
  user-select: none;
  width: 100%;
  max-width: 320px;
  pointer-events: auto;
}

#purposeConfirmBtn:hover {
  background: linear-gradient(135deg, #845ca7, #6b4587);
  transform: scale(1.06);
  box-shadow:
    0 9px 28px rgba(132, 92, 167, 0.95),
    inset 0 -7px 22px rgba(107, 69, 135, 1);
}

#purposeConfirmBtn:active {
  transform: scale(0.95);
  box-shadow:
    0 5px 12px rgba(132, 92, 167, 0.7),
    inset 0 -4px 12px rgba(107, 69, 135, 0.85);
  background: linear-gradient(135deg, #6b4587, #4d3463);
}

#purposeConfirmBtn:focus-visible {
  outline: 3px solid #d3c6f5;
  outline-offset: 3px;
}

/* Адаптивність */
@media (max-width: 480px) {
  #purposeModal .modal-content {
    width: 90%;
    padding: 25px 30px 35px;
  }

  #purposeModal h2 {
    font-size: 20px;
  }

  #purposeModal p {
    font-size: 15px;
  }

  .purpose-options label {
    font-size: 14px;
    padding: 12px 18px;
  }

  #purposeConfirmBtn {
    font-size: 16px;
    padding: 12px 28px;
    border-radius: 12px;
    max-width: 100%;
  }
}


@media (max-width: 768px) {
  .nickname-container {
    flex-direction: column;
    gap: 15px;
    padding: 10px;
  }

  .image-container img {
    width: 220px;
    height: 220px;
    margin: 0 auto 15px;
  }

  input#nickname,
  button#donateButton {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 15px;
  }

  h2 {
    font-size: 18px;
    padding-left: 10px;
    padding-right: 30px;
  }

  .image-container img {
    width: 180px;
    height: 180px;
  }

  input#nickname {
    font-size: 14px;
    padding: 10px 0;
  }

  button#donateButton {
    font-size: 14px;
    padding: 10px;
  }

  #error-message {
    font-size: 14px;
  }
}



.footer {
  background-color: #000000;
  /* Темний фон по всьому екрану */
  padding: 40px 0 30px 0;
  /* Вертикальні відступи */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer__container {
  background-color: rgba(68, 34, 71, 0.9);
  /* Темно-фіолетовий напівпрозорий фон */
  max-width: 800px;
  width: 100%;
  padding: 20px 30px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(224, 126, 228, 0.7);
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
}

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

.footer__logo {
  width: 46px;
  height: 46px;
  filter: none;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #fff1cc;
}

.footer__center {
  margin-left: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-grow: 1;
}

.footer__icon-link img {
  width: 24px;
  height: 24px;
  filter: brightness(1) saturate(1);
  transition: filter 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.footer__icon-link:hover img {
  filter: brightness(1.3) saturate(1.5);
  transform: scale(1.1);
}

.footer__right {
  font-size: 13px;
  text-align: right;
  color: #fff1cc;
  user-select: none;
  white-space: nowrap;
}

.footer__right strong {
  font-weight: 600;
  cursor: default;
}

.footer__separator {
  max-width: 840px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(224, 126, 228, 0.7), rgba(179, 108, 11, 0.9), rgba(224, 126, 228, 0.7));
  margin: 20px auto 10px auto;
  border-radius: 2px;
  width: 100%;
}

.footer__note {
  max-width: 840px;
  margin: 0 auto 30px auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-style: italic;
  font-family: 'Segoe UI', sans-serif;
  user-select: none;
}

/* Адаптивність */

@media (max-width: 768px) {
  .footer__container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 0px;
  }

  .footer__center {
    margin-left: 5px;
    gap: 15px;
  }

  .footer__right {
    text-align: center;
    white-space: normal;
  }

  .footer__left {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer__icon-link img {
    width: 28px;
    height: 28px;
  }
}


/* === YouTube Modal — центр по viewport і фірмовий стиль === */
#youtubeModal.modal {
  position: fixed;
  inset: 0;
  display: flex;
  /* центр */
  align-items: center;
  /* центр по вертикалі */
  justify-content: center;
  /* центр по горизонталі */
  padding: 32px;
  background: rgba(7, 5, 10, .72);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

#youtubeModal .modal-content {
  width: min(860px, 96vw);
  max-height: 90vh;
  overflow: auto;
  margin: 0;
  /* щоб не “сповзала” вниз */
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .08);
  /* Фірмовий фон: легкий пурпур + скло */
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(177, 129, 255, .18) 0%, rgba(177, 129, 255, 0) 60%),
    linear-gradient(180deg, #2c2441 0%, #1f1a2e 100%);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 24px 22px 20px;
}

/* Заголовок + хрестик */
#youtubeModal h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  letter-spacing: .2px;
  margin: 0 48px 16px 0;
  color: #f4eeff;
}

#youtubeModal .close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  border-radius: 10px;
  color: #e7dcff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, color .15s ease;
}

#youtubeModal .close:hover {
  background: rgba(255, 255, 255, .1);
}

#youtubeModal .close:active {
  transform: translateY(1px);
}

/* Верхній блок форми — як “панель” з другого скріна */
#youtubeModal .yt-input-wrap,
#youtubeModal .yt-rules {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .08);
}

#youtubeModal .yt-input-wrap {
  margin: 8px 0 12px;
}

#youtubeModal .yt-input-wrap label {
  display: block;
  font-size: 14px;
  color: #d9cff3;
  margin-bottom: 6px;
}

#youtubeModal #yt-url {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: #2a2439;
  color: #f6f1ff;
  outline: 0;
  transition: box-shadow .15s ease, border-color .15s ease;
}

#youtubeModal #yt-url::placeholder {
  color: #b9aeda;
}

#youtubeModal #yt-url:focus {
  border-color: #b38cff;
  box-shadow: 0 0 0 4px rgba(179, 140, 255, .22);
}

/* Правила — списки та чекбокс */
#youtubeModal .yt-rules {
  margin: 0 0 14px;
  color: #d9cff3;
}

#youtubeModal .yt-rules h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #f4eeff;
}

#youtubeModal .yt-rules ul {
  margin: 0 8px 10px 22px;
}

#youtubeModal .yt-accept {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

#youtubeModal .yt-error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  background: rgba(255, 100, 100, .12);
  border: 1px solid rgba(255, 100, 100, .28);
  color: #ffd0d0;
}

/* Прев’ю відео */
#youtubeModal .video-wrapper {
  margin-top: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #1b1627;
  overflow: hidden;
}

#youtubeModal .video-wrapper iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
}

/* Кнопки */
#youtubeModal .modal-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

#youtubeModal #yt-continue,
#youtubeModal #yt-skip {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .18s ease, filter .18s ease, background .18s ease, border-color .18s ease;
}

/* Primary (пурпур як на твоїх кнопках) */
#youtubeModal #yt-continue {
  color: #120922;
  background: linear-gradient(180deg, #c09bff 0%, #a67aff 100%);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 16px 40px rgba(90, 0, 180, .35), 0 4px 14px rgba(90, 0, 180, .25);
}

#youtubeModal #yt-continue:hover {
  filter: brightness(1.06);
  box-shadow: 0 22px 50px rgba(90, 0, 180, .45), 0 6px 18px rgba(90, 0, 180, .3);
}

#youtubeModal #yt-continue:active {
  transform: translateY(1px);
}

#youtubeModal #yt-continue[disabled] {
  opacity: .6;
  cursor: not-allowed;
  filter: grayscale(.25);
}

/* Secondary (скляна) */
#youtubeModal #yt-skip {
  color: #efe9ff;
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
}

#youtubeModal #yt-skip:hover {
  background: rgba(255, 255, 255, .1);
}

#youtubeModal #yt-skip:active {
  transform: translateY(1px);
}

/* Мобільні */
@media (max-width: 720px) {
  #youtubeModal .modal-content {
    padding: 18px;
    max-height: 92vh;
  }

  #youtubeModal .modal-actions {
    justify-content: stretch;
  }

  #youtubeModal #yt-continue,
  #youtubeModal #yt-skip {
    flex: 1 1 auto;
  }
}


/* === YouTube Modal — compact overrides (без прев'ю) === */

/* Центр і трохи менше поле */
#youtubeModal.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px !important;
  /* було 32px */
}

/* Менші габарити картки */
#youtubeModal .modal-content {
  width: min(520px, 92vw) !important;
  /* було 860px */
  max-height: 78vh !important;
  /* було 90vh */
  padding: 18px 16px !important;
  /* було 24px 22px */
  border-radius: 18px !important;
  /* було 24px */
  margin: 0 !important;
  /* щоб не сповзала вниз */
}

/* Заголовок компактніше */
#youtubeModal h2 {
  font-size: clamp(18px, 2vw, 22px) !important;
  margin: 0 44px 10px 0 !important;
}

/* Панелі: трошки менше відступів */
#youtubeModal .yt-input-wrap,
#youtubeModal .yt-rules {
  padding: 12px 14px !important;
  border-radius: 14px !important;
  margin-bottom: 10px !important;
}

/* Поле */
#youtubeModal #yt-url {
  padding: 10px 12px !important;
  border-radius: 10px !important;
}

/* Повністю сховати прев'ю відео */
#youtubeModal .video-wrapper {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Кнопки: компактніше */
#youtubeModal .modal-actions {
  margin-top: 10px !important;
  gap: 8px !important;
  justify-content: flex-end !important;
}

#youtubeModal #yt-continue,
#youtubeModal #yt-skip {
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

/* Мобільні ще компактніші */
@media (max-width: 720px) {
  #youtubeModal .modal-content {
    width: 92vw !important;
    max-height: 86vh !important;
    padding: 16px !important;
  }

  #youtubeModal .modal-actions {
    justify-content: stretch !important;
  }

  #youtubeModal #yt-continue,
  #youtubeModal #yt-skip {
    flex: 1 1 auto !important;
  }
}



.rank-small {
  width: 68px !important;
  height: auto !important;
  position: absolute;
  /* картинка перестає впливати на розкладку */
  margin-left: 6px;
  bottom: 60px;
  /* трохи вище */
  object-fit: contain;
  pointer-events: none;
  z-index: 10;
  /* поверх тексту */
}

/* щоб текст не зміщувався */
.rank-wrapper {
  position: relative;
  display: inline-block;
  padding-right: 75px;
  /* запас щоб текст не залізав на картинку */
}

/* адаптивність */
@media (max-width: 768px) {
  .rank-small {
    width: 64px !important;
  }
}

@media (max-width: 480px) {
  .rank-small {
    width: 52px !important;
  }
}

/* ─────────────────────────────────────────────
   INPUT PROPORTIONS FIX
───────────────────────────────────────────── */
.input-button-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 280px;
  align-items: stretch;
}

.input-button-container input,
.input-button-container button {
  width: 100%;
  box-sizing: border-box;
  border-radius: 7px;
  transition: box-shadow 0.3s ease;
}

/* ─────────────────────────────────────────────
   MOBILE ANIMATION (fade + slide up)
───────────────────────────────────────────── */
@keyframes modalMobileIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .modal.active .modal-content,
  .modal[style*="opacity: 1"] .modal-content {
    animation: modalMobileIn 0.28s cubic-bezier(0.34, 1.1, 0.64, 1) both;
  }

  /* Bigger close button tap area */
  .close {
    font-size: 32px;
    right: 4px;
    top: -4px;
    padding: 6px 10px;
  }
}

/* ─────────────────────────────────────────────
   YOUTUBE MODAL — повний редизайн
───────────────────────────────────────────── */
.yt-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 2, 10, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@keyframes ytCardIn {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.yt-glow {
  position: fixed;
  width: min(540px, 95vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(140,60,255,.22) 0%, rgba(200,60,200,.1) 40%, transparent 75%);
  pointer-events: none;
  filter: blur(30px);
  z-index: 1001;
}

.yt-card {
  position: relative;
  z-index: 1002;
  width: min(520px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(160,100,255,.3) transparent;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(145deg, #1a0b2e 0%, #2d1b4e 50%, #1a0b2e 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 40px 90px rgba(0,0,0,.75),
    0 0 80px rgba(120,50,220,.18);
  animation: ytCardIn 0.32s cubic-bezier(0.34,1.18,0.64,1) both;
}

.yt-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.yt-icon-wrap {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(239,68,68,.4);
}

.yt-title {
  flex: 1;
  font-size: 18px; font-weight: 700;
  color: rgba(255,255,255,.95);
  margin: 0; line-height: 1.35;
  text-shadow: none; letter-spacing: 0; padding: 0;
}

.yt-close {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .25s ease;
}
.yt-close:hover { background: rgba(255,255,255,.12); color:#fff; transform: rotate(90deg); }

.yt-body { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 24px; }

.yt-field { display: flex; flex-direction: column; gap: 8px; }

.yt-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75); letter-spacing: .01em; }

.yt-input-wrap { position: relative; display: flex; align-items: center; }

.yt-input-icon {
  position: absolute; left: 14px;
  display: flex; align-items: center;
  color: rgba(255,255,255,.35); pointer-events: none;
  transition: color .2s ease; z-index: 1;
}
.yt-input-wrap:focus-within .yt-input-icon { color: rgba(168,85,247,.9); }

.yt-input {
  width: 100%; box-sizing: border-box;
  padding: 14px 42px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: #fff; font-size: 14px; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.yt-input::placeholder { color: rgba(255,255,255,.25); }
.yt-input:hover { border-color: rgba(255,255,255,.2); }
.yt-input:focus {
  border-color: rgba(168,85,247,.8);
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 3px rgba(140,60,255,.18), 0 0 20px rgba(140,60,255,.1);
}

.yt-check-icon {
  position: absolute; right: 14px;
  display: flex; align-items: center; pointer-events: none;
  animation: ytCheckPop .25s cubic-bezier(0.34,1.5,0.64,1) both;
}
@keyframes ytCheckPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.yt-rules-box {
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  padding: 18px 18px 16px;
}

.yt-rules-title { font-size: 15px; font-weight: 800; color: rgba(255,255,255,.95); margin: 0 0 14px; text-shadow: none; letter-spacing: 0; }

.yt-rules-list { display: flex; flex-direction: column; gap: 12px; }

.yt-rule-item { display: flex; align-items: flex-start; gap: 11px; }

.yt-rule-badge {
  flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.yt-rule-green { background: rgba(74,222,128,.15); }
.yt-rule-amber { background: rgba(251,191,36,.15); }
.yt-rule-red   { background: rgba(248,113,113,.15); }

.yt-rule-item p { margin: 0; font-size: 13.5px; line-height: 1.55; color: rgba(210,190,255,.82); }
.yt-rule-item strong { color: rgba(255,255,255,.92); font-weight: 700; }

.yt-sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

.yt-checkbox-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  user-select: none;
}
.yt-checkbox-row:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); }

.yt-checkbox-box {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 8px;
  border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.yt-checkbox-row.checked .yt-checkbox-box {
  background: linear-gradient(135deg,#a855f7,#7c3aed);
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168,85,247,.2);
}
.yt-checkbox-check {
  opacity: 0; transform: scale(0);
  transition: opacity .15s ease, transform .2s cubic-bezier(0.34,1.5,0.64,1);
}
.yt-checkbox-row.checked .yt-checkbox-check { opacity: 1; transform: scale(1); }

.yt-checkbox-label { font-size: 13.5px; font-weight: 600; color: rgba(220,200,255,.88); }

.yt-error {
  padding: 10px 14px; border-radius: 12px; font-size: 12.5px;
  background: rgba(255,80,80,.1); border: 1px solid rgba(255,90,90,.25); color: #ffbbbb;
}

.yt-submit {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 20px; border-radius: 16px; border: none;
  font-size: 16px; font-weight: 700; cursor: pointer;
  color: rgba(255,255,255,.4); background: rgba(255,255,255,.07);
  transition: all .25s ease;
}
.yt-submit:not([disabled]) {
  color: #fff;
  background: linear-gradient(135deg,#9333ea 0%,#db2777 60%,#7c3aed 100%);
  box-shadow: 0 8px 28px rgba(147,51,234,.45), 0 2px 8px rgba(147,51,234,.3);
}
.yt-submit:not([disabled]):hover {
  filter: brightness(1.1);
  box-shadow: 0 12px 36px rgba(147,51,234,.6), 0 4px 14px rgba(147,51,234,.4);
  transform: translateY(-1px);
}
.yt-submit:not([disabled]):active { transform: translateY(1px); }
.yt-submit[disabled] { cursor: not-allowed; }

.yt-submit-arrow {
  opacity: 0; transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.yt-submit:not([disabled]) .yt-submit-arrow {
  opacity: 1; transform: translateX(0);
  animation: ytArrow 1.5s ease-in-out infinite;
}
@keyframes ytArrow {
  0%,100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

/* YouTube modal — mobile */
@media (max-width: 540px) {
  .yt-overlay {
    padding: 12px;
    align-items: center;
  }
  .yt-glow { display: none; }
  .yt-card {
    width: 100%;
    max-height: 88vh;
    border-radius: 22px;
  }
  .yt-header { padding: 18px 16px 14px; }
  .yt-body   { padding: 14px 16px 22px; gap: 12px; }
  .yt-title  { font-size: 16px; }
  .yt-rules-box { padding: 14px 14px 12px; }
  .yt-input  { padding: 13px 42px; }
  .yt-submit { padding: 15px; }
}

/* ─────────────────────────────────────────────
   RANK SMALL
───────────────────────────────────────────── */
.rank-small {
  width: 68px !important; height: auto !important;
  position: absolute;
  margin-left: 6px; bottom: 60px;
  object-fit: contain; pointer-events: none;
  z-index: 10;
}
.rank-wrapper { position: relative; display: inline-block; padding-right: 75px; }

@media (max-width: 768px) { .rank-small { width: 64px !important; } }
@media (max-width: 480px) { .rank-small { width: 52px !important; } }


/* ═══════════════════════════════════════════════
   MODAL POSITIONING — ОСТАТОЧНИЙ FIX
   Перекриває всі попередні правила
═══════════════════════════════════════════════ */

/* Desktop та планшети: строго по центру */
.modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  z-index: 1000;
}

/* Контент — десктоп */
.modal > .modal-content {
  margin: 0 !important;
  position: relative !important;
}

/* Телефони: трошки вище центру */
@media (max-width: 480px) {
  .modal {
    align-items: flex-start !important;
    padding-top: 80px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-bottom: 24px !important;
    overflow-y: auto !important;
  }

  .modal > .modal-content {
    width: 94% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 18px 16px 22px !important;
  }
}


/* ═══════════════════════════════════════════════
   BUCKS-BOX MOBILE FIX — 1 колонка, однаковий розмір
═══════════════════════════════════════════════ */
@media (max-width: 720px) {
  .bucks-container,
  .bucks-container_sponsor {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 0 !important;
  }

  .bucks-box {
    width: 80% !important;
    max-width: 850px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 720px) {
  .bucks-box img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}


/* ── suffixModal — власний хрестик ── */
#suffixModal > .close {
  position: fixed;
  top: 16px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #bbb;
  cursor: pointer;
  user-select: none;
  z-index: 1100;
  line-height: 1;
  transition: color 0.2s ease;
  /* скидаємо будь-які успадковані абсолютні відступи */
  left: auto;
  bottom: auto;
}

#suffixModal > .close:hover {
  color: #fff;
}


/* ── rank-small mobile fix ── */
@media (max-width: 720px) {
  .rank-small {
    width: 42px !important;
    bottom: 48px !important;
    margin-left: 4px !important;
  }

  .rank-wrapper {
    padding-right: 50px !important;
  }
}

@media (max-width: 480px) {
  .rank-small {
    width: 34px !important;
    bottom: 42px !important;
  }

  .rank-wrapper {
    padding-right: 40px !important;
  }
}


/* ── rank-small — інлайн на мобільному ── */
@media (max-width: 720px) {
  .rank-small {
    position: static !important;
    display: inline-block !important;
    width: 36px !important;
    height: auto !important;
    vertical-align: middle !important;
    margin-left: 6px !important;
    margin-bottom: 2px !important;
    bottom: auto !important;
  }

  .rank-wrapper {
    padding-right: 0 !important;
  }
}


/* ── rank-small v3 — фінальний фікс ── */
@media (max-width: 720px) {
  .rank-small {
    position: static !important;
    display: inline-block !important;
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
    vertical-align: middle !important;
    margin-left: 5px !important;
    margin-bottom: 3px !important;
    bottom: auto !important;
  }

  .rank-wrapper {
    padding-right: 0 !important;
  }

  /* h3 в картці — інлайн щоб іконка сиділа поруч */
  .bucks-box h3 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
}


/* ── приховати <br> всередині h3 на мобільному ── */
@media (max-width: 720px) {
  .bucks-box h3 br {
    display: none !important;
  }
}


/* ══ RANK-SMALL FINAL OVERRIDE ══ */
@media (max-width: 720px) {
  .bucks-box h3 {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    margin: 10px 0 !important;
  }

  .bucks-box h3 br {
    display: none !important;
  }

  .bucks-box h3 .rank-small,
  .bucks-box h3 img.rank-small {
    position: static !important;
    display: inline-block !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    object-fit: contain !important;
    margin: 0 !important;
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    vertical-align: middle !important;
  }
}

/* ===  ТИМЧАСОВО ВИМКНЕНІ КНОПКИ === */
button[id^="buyButton"],
button[id^="buyButtoncoin"] {
  background-color: #444 !important;
  color: #888 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.6 !important;
  border: none !important;
}