/* Загальні стилі */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #0f0f0f; /* Темніший фон */
    color: #e8e8e8; /* Світліший текст */
    text-align: center;
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box; /* Для забезпечення коректного розмірювання */
}

/* ШРИФТИ*/
body {
    font-family: "Exo 2", sans-serif;
}

.h2 {
    font-family: 'Orbitron', sans-serif;
}
/* Шоб дефолтний текст при наведенні світився клано */
.content p:hover{
    color: #9717fa;
}

/* Стилі для Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #282828;
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Меню за замовчуванням (на десктопі) */
.nav-list {
    list-style: none;
    display: flex;
    justify-content: center; /* Центрує меню */
    width: 100%;
    padding: 0;
    margin: 0;
    gap: 20px;
}

/* Посилання в меню */
.nav-list li {
    margin: 0;
}

.nav-list li a {
    text-decoration: none;
    color: #e8e8e8;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.nav-list li a:hover {
    color: #9000ff;
}

/* Бургер-меню (кнопка) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 30px;
    height: 4px;
    background: white;
    margin: 5px 0;
}

/* Мобільна версія */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        background: #282828;
        text-align: center;
        padding: 10px 0;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list li {
        margin: 15px 0;
    }
}

/* Щоб контент не ховався під navbar */
.content {
    padding-top: 80px;
}

/* Затемнене фонове зображення */
.intro {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.3em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden; /* Запобігає виходу відео за межі */
}


/* Відео як фон */
#background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

@media screen and (max-width: 768px) {
    #background-video {
        opacity: 0%;
    }
}

/* Темний шар поверх відео */
.intro::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Напівпрозорий темний фон */
}

/* Анімація появи */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Покращений дизайн контенту */
.content {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    padding: 40px;
    font-size: clamp(1.2em, 1.2vw, 2.2em);
    color: #dcdcdc;
    line-height: 1.8;
    max-width: 900px;
    margin: 50px auto;
    text-align: center;
}


/* Додано більший відступ знизу, щоб видно було контейнери */
.content:last-of-type {
    margin-bottom: 10px;
}

/* Послідовне з’явлення */
.content:nth-child(2) { animation-delay: 0.6s; }
.content:nth-child(3) { animation-delay: 1.2s; }
.content:nth-child(4) { animation-delay: 1.8s; }
.content:nth-child(5) { animation-delay: 2.3s; }

/* Заголовки */
.content h2 {
    color: #9000ff;
    font-size: clamp(1.5em, 2vw, 2em);
    text-transform: uppercase;
    margin-bottom: 18px;
    letter-spacing: 1.5px;
}

/* Кнопка для реклами */
.content button {
    background: #9717fa;
    color: black;
    border: none;
    padding: 12px 25px;
    font-size: clamp(1em, 1.1vw, 1.1em);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

.content button:hover {
    background: #9000ff;
    transform: scale(1.05);
}

/* Текст */
.content p {
    font-size: clamp(1em, 1.1vw, 1.1em);
    color: #c0c0c0;
    line-height: 1.9;
    text-align: justify;
}

section {
    width: 100%; /* Секція займає всю ширину вікна */
    height: 100vh; /* Секція займає всю висоту екрана */
    padding: calc(var(--sizeindex) * 2) calc(var(--sizeindex) * 2); /* Відступи на основі змінної */
    position: relative; /* Для можливості додавання додаткових елементів або позиціювання */
    display: flex; /* Використання флексбокса для центрування контенту */
    flex-direction: column; /* Елементи всередині секції вирівнюються по вертикалі */
    justify-content: center; /* Центрування контенту по вертикалі */
    align-items: center; /* Центрування контенту по горизонталі */
}


/* Блок з новинами і про нас */
.about {
    width: 900px;
    height: 200px;
    border: 2px solid #9000ff;
    border-radius: 20px;
    padding: 10px 20px;
    box-sizing: border-box;
    transition: all 0.3s ease; /* Для плавного анімаційного переходу */
}

.about1 {
    width: 900px;
    height: 250px;
    border: 2px solid #9000ff;
    border-radius: 20px;
    padding: 10px 20px;
    box-sizing: border-box;
    transition: all 0.3s ease; /* Для плавного анімаційного переходу */
}

@media (max-width: 768px) {
    .about, .about1 {
        width: 90%; /* Збільшуємо ширину на мобільних пристроях */
        height: auto; /* Автоматична висота */
        padding: 15px;
        border-radius: 15px;
    }
}

/* Блок з донатом */
.about2 {
    width: 900px;
    height: 280px;
    border: 2px solid #9000ff;
    border-radius: 20px;
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    transition: all 0.3s ease; /* Для плавного анімаційного переходу */
}

.about2 p {
    text-align: center;
}

.about2 button {
    padding: 10px 20px;
    background-color: #9000ff;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.about2 button:hover {
    background-color: #6a00cc;
}

@media (max-width: 768px) {
    .about2 {
        margin-left: 20px;
        width: 90%; /* Збільшуємо ширину на мобільних */
        height: auto; /* Автоматична висота */
        padding: 15px;
        border-radius: 15px;
    }

    .about2 h2 {
        font-size: 1.5em;
    }

    .about2 p {
        font-size: 1em;
    }

    .about2 button {
        width: 100%; /* Збільшуємо кнопку до повної ширини */
        padding: 12px 0;
    }
}


.games-container{
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    padding: 40px;
    font-size: clamp(1.2em, 1.2vw, 2.2em);
    color: #dcdcdc;
    line-height: 1.8;
    max-width: 1000px;
    margin: 50px auto;
    text-align: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 200px;
    justify-items: center;
}


/* Стиль картки */
.game-card {
    width: 100%;
    max-width: 420px;
    background: #222;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    text-align: center;
    margin: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

@media (max-width: 768px) {
    .game-card {
        max-width: 350px;
    }
}

/* Зображення */
.game-card img {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

/* Заголовок гри */
.game-card h3 {
    font-size: clamp(1.6em, 1.8vw, 1.8em);
    margin-bottom: 12px;
    color: #9000ff;
}

/* Опис гри */
.game-card p {
    font-size: clamp(1em, 1.2vw, 1.2em);
    color: #d0d0d0;
    margin-bottom: 20px;
    opacity: 0.9;
    text-align: left;
}

.game-card .button {
    background: #9717fa;
    color: black;
    border: none;
    padding: 12px 25px;
    font-size: clamp(1em, 1.1vw, 1.1em);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

.game-card .button:hover {
    background: #9000ff;
    transform: scale(1.05);
}


/* Послідовне з'явлення карток */
.game-card:nth-child(1) { animation-delay: 0.6s; }
.game-card:nth-child(2) { animation-delay: 1.2s; }
.game-card:nth-child(3) { animation-delay: 2.4s; }

/* Анімація */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Контейнер для всього контенту */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 10vh;
    height: 100%;
    scroll-snap-type: y mandatory;
}

/* Основний контент */
.main-content {
    flex: 1;
}

/* Контейнер з командою */
.team-container {
    width: 60%;
    max-width: 100vw;
    display: flex;
    overflow-x: auto; /* Додає горизонтальний скрол */
    scroll-snap-type: x mandatory; /* Прив'язка до позицій елементів */
    gap: 35px;
    padding: 40px;
    max-width: 1000px;
    margin: 50px auto;
    text-align: center;
}

/* Ховаємо скролбар */
.team-container::-webkit-scrollbar {
    display:none;
}

.team-card {
    flex: 0 0 auto; /* Фіксований розмір для прокрутки */
    width: 300px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
    scroll-snap-align: center; /* Прив'язка до позицій при прокрутці */
}

@media (max-width: 768px) {
    .team-container {
        gap: 45px;
        width: 100%;
    }
}

.team-container h3{
    color: #9000ff;
}

.team-container p{
    text-align: center;
}

.team-card {
    width: 100%;
    max-width: 380px;
    height: 350px;
    position: relative;
    perspective: 1000px;
    cursor: pointer;
}
/* grab effect */
.team-container {
    cursor: grab;
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth; /* Додано плавну прокрутку */
}

.team-container.dragging {
    cursor: grabbing; /* Зміна курсору під час перетягування */
}

.team-card {
    transition: transform 0.2s ease; /* Плавна трансформація карток */
    margin-right: 15px; /* Відстань між картками */
}

.team-container::-webkit-scrollbar {
    display: none; /* Сховані скроллбарі для елегантного вигляду */
}

@media (max-width: 768px) {
    .team-card {
    width: 100%;
    }
}

.card-front, .card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.6s, z-index 0.6s;
}

.card-front {
    background: #222;
    color: #fff;
}

.card-back {
    background: #222;
    color: #fff;
    transform: rotateY(180deg);
    padding: 10px;
    padding-bottom: 20px;
}
.card-back h4 {
    margin-top: 1px;  /* Зменшений верхній відступ */
    margin-bottom: 1px;  /* Зменшений нижній відступ */
    font-size: 20px; /* Опціонально — трохи менший розмір */
}

.card-front, .card-back{
    color: #9000ff;
}

.team-card.flipped .card-front {
    transform: rotateY(180deg);
}

.team-card.flipped .card-back {
    transform: rotateY(0deg);
}

#dima-lavrinenko-back {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                      url('files/team-cards/dimazdevochkami.jpg');
    background-size: cover;
    background-position: center;
}

#dima-lavrinenko-back h3, 
#dima-lavrinenko-back h4 {
    background-color: #000000c4;
}



.img-social {
    padding: 30px;
    display: grid;
    justify-items: center;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Менший minmax для іконок */
}

.img-social img {
    max-width: 40px;  /* Задаємо фіксовану ширину для іконок */
    height: auto;      /* Автоматична висота для збереження пропорцій */
    margin: 10px;      /* Відступи між зображеннями */
}


.images-follow{
    margin-left: 90px;
    padding: 40px;
    display: flex;
    justify-items: center;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.images-follow img {
    max-width: 90%;            /* Адаптація до ширини контейнера */
    height: 50%;              /* Збереження пропорцій */
    margin: 10px;              /* Відступи між зображеннями */
}

/* Оптимізація для маленьких екранів */
@media (max-width: 768px) {
    .images-follow {
        display: flex;                /* Використовуємо флексбокс для вирівнювання */
        flex-wrap: wrap;              /* Дозволяє елементам переноситися на новий рядок */
        justify-content: space-around; /* Вирівнювання по ширині */
        width: 100%;                  /* Ширина на 100% */
        margin: 0 auto;               /* Центруємо контейнер */
    }

    .images-follow img {
        width: 100%;                  /* Задаємо ширину 100% для зображень */
        max-width: 150px;             /* Максимальна ширина кожного зображення */
        height: auto;                 /* Збереження пропорцій */
        margin: 10px;                 /* Відступи між зображеннями */
        object-fit: contain;          /* Для збереження пропорцій зображень */
    }
}


/* Футер */
footer {
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: center;
    align-items: center;
    color: #888;
    padding: 15px;
    text-align: center;
    font-size: 1em;
}

footer a {
    text-decoration: none; /* Прибирає підкреслення */
    color: inherit; /* Залишає стандартний колір */
    transition: color 0.3s ease; /* Додає плавний ефект при наведенні */
}

footer:hover{
    color:#9000ff; 
}