/* custom.css */

:root {
    --button-img-url: url(../images/button/button.png?v=1);
    --font-0: "Intro", "Open Sans", Tahoma, Arial, sans-serif;
    --font-1: "Arturo", "Intro", "Open Sans", Tahoma, Arial, sans-serif;
    --font-2: "Book Antiqua", "Celtes SP", Arial, sans-serif;
    --font-3: "riverhack", "Celtes SP", Arial, sans-serif;
    --font-4: "Intro Book", "Intro", "Open Sans", Tahoma, Arial, sans-serif;
    --button-w: 36.6875rem;
    --button-h: 10.625rem;
    --button-fs: 1.8rem;
}

.instruction-overlay {
    position: fixed;
    z-index: 100;
    width: 100%;
    height: 100%;
    display: none;
}
.instruction-overlay--visible {
    display: block;
}
.instruction-overlay__background {
    background-color: #0008;
    width: 100%;
    height: 100%;
}
.instruction-overlay-content {
    position: absolute;
    z-index: 101;
    overflow-y: auto;
    background: linear-gradient(#5e1c0f, #952f1a);
    color: #efe3d7;
    font-size: 1.5rem;
    padding-left: 1.7rem;
    padding-right: 1.7rem;
    padding-top: 1rem;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 25rem;
    min-height: 20rem;
    max-height: 80vh;
    border-radius: 5%;
}
.instruction-overlay-content__note {
    font-family: cursive;
    background-color: #732618;
    padding: 5px;
    font-size: 0.8em;
    box-shadow: 2px 2px 15px #ca5b47;
    border-radius: 0.3em;
}
.instruction-overlay-content__close-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    overflow: hidden;
    background-color: #d09444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.instruction-overlay-content__close-btn::before,
.instruction-overlay-content__close-btn::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: #333;
    border-radius: 1px;
}
.instruction-overlay-content__close-btn::before {
    transform: rotate(45deg) translateY(50%);
}
.instruction-overlay-content__close-btn::after {
    transform: rotate(-45deg) translateY(50%);
}

.feature__content_back {
    justify-content: center;
}

.generous__container {
    display: block;
    margin-top: 1rem;
}

.generous__tabs {
    text-align: center;
}

.generous__media {
    aspect-ratio: 16 / 9;
    height: auto;
    width: auto;
    max-height: 56vh;
    margin: auto;
}

.generous__items {
    align-items: flex-start;
}

.feature__content_front {
    justify-content: center;
    padding-top: 10.375rem;
}

.prize__heading {
    font-size: calc(0.9rem * var(--prize-scale));
}

.prize__heading:after {
    background-size: 100% 150%;
}

.raffle__fond  {
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-weight: bold;
}


.shine-text {
  background: linear-gradient(
    90deg,
    #ffd092 0%,
    #eba242 50%,
    #fff 100%
  );
  background-size: 200% 100%;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: none;
}

.shine-text.active {
  animation: shine 3s ease forwards;
}

.button_txt {
    font-weight: normal;
    color: #000;
}

[data-section=aboutclass] {
    background-image:url(../images/aboutclass/bg.jpg?v=1);
}

[data-section=invitation] {
    background-image:url(../images/invitation/bg.jpg?v=1);
}

[data-section=hero] {
    background-image: url(../images/hero/bg.jpg?v=2);
}

[data-section=updates], [data-section=generous], [data-section=theses], [data-section=game], [data-section=start], [data-section=steps] {
    background-image:url(../images/bg-def.jpg?v=1);
}

[data-section=features], [data-section=community] {
    background-image:url(../images/bg-def-2.jpg?v=1);
}

.feature__text {
    max-width: 30rem;
    font-size: 1rem;
    overflow: visible;
}

.raffle__title {
    font-size: 3.15rem;
}

@keyframes shine {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ========================================
   FIX: Горизонтальная прокрутка кнопок-селекторов на мобильных
   Проблема: 6 кнопок не влезают на узких экранах
   Решение: Горизонтальный скролл
   ======================================== */

@media (max-width: 1199.9px) {
    .generous__items {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 6px !important;
        padding-bottom: 10px !important;
        -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
        scroll-behavior: smooth;
    }

    .generous__items::-webkit-scrollbar {
        height: 6px;
    }

    .generous__items::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }

    .generous__items::-webkit-scrollbar-thumb {
        background: rgba(255, 215, 0, 0.5);
        border-radius: 3px;
    }

    .generous__items::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 215, 0, 0.8);
    }

    .generous__thumb {
        flex-shrink: 0 !important; /* Не сжимаем кнопки */
        min-width: auto !important;
    }

    .instruction-overlay-content {
        font-size: 1.2rem;
    }

    .generous__media {
        transform: scale(1);
    }

    [data-section=hero] {
        background-image: url(../images/hero/bg-tablet.jpg?v=2);
    }
}

/* Для очень маленьких экранов - уменьшаем кнопки */
@media (max-width: 539.9px) {
    .generous__thumb {
        transform: scale(0.9) !important;
    }

    .instruction-overlay-content {
        font-size: 1rem;
        width: 17rem;
    }

    [data-section=hero] {
        background-image: url(../images/hero/bg-mobile.jpg?v=2);
    }
}

@media (min-width: 680px) {
    .raffle__title {
        font-size: 5.9rem;
    }
}
