
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-image: url('../assets/images/background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100%;
    /* Фолбек колір якщо зображення не завантажиться */
    background-color: #64da2d;
}

body {
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    color: #333;
    position: relative;
    min-height: 100vh;
    background: transparent;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        45deg,
        rgba(76, 175, 80, 0.1) 0%,
        rgba(255, 193, 7, 0.1) 50%,
        rgba(255, 152, 0, 0.1) 100%
    );
    z-index: -1;
    pointer-events: none;
}

/* Головний контейнер - прокручується поверх фону */
.main-container {
    position: relative;
    min-height: 100vh;
    padding: 20px;
    max-width: 800px; /* Було 1000px */
    margin: 0 auto;
    width: 100%;
    z-index: 1;
    background: transparent;
}

/* Хедер */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.game-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #FF6B35;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

/* Перемикач мови */
.language-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.3);
    color: #2E7D32;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Героїчна секція */
.hero-section {
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.video-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-video {
    width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
}

.video-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 5px solid rgba(255, 193, 7, 0.6);
    border-radius: 25px;
    pointer-events: none;
}

/* Кнопка грати */
.play-button {
    position: relative;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: none;
    padding: 20px 50px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    overflow: hidden;
}

.play-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.6);
}

.play-button:active {
    transform: translateY(-1px);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.play-button:hover .button-glow {
    left: 100%;
}

/* Соціальні кнопки */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-btn.telegram { border-color: #0088cc; }
.social-btn.facebook { border-color: #1877f2; }
.social-btn.youtube { border-color: #ff0000; }
.social-btn.token { border-color: #ffd700; }
.social-btn.contact { border-color: #4caf50; }

/* Іконки соціальних мереж */
.social-btn i {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-telegram { background-image: url('../assets/images/icons/telegram.svg'); }
.icon-facebook { background-image: url('../assets/images/icons/facebook.svg'); }
.icon-youtube { background-image: url('../assets/images/icons/youtube.svg'); }
.icon-token { background-image: url('../assets/images/icons/token.svg'); }
.icon-contact { background-image: url('../assets/images/icons/contact.svg'); }

/* Секції контенту */
.content-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 50px;
    max-width: 700px; /* Було 900px */
    margin-left: auto;
    margin-right: auto;
}

.content-card {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(1px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-card:hover {
    background: rgba(255, 255, 255, 0.01) !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    color: #FF6B35;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* Контент картки */
.community-container,
.story-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Секція скріншотів */
.screenshots-card {
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01) !important; /* Менша прозорість фону */
    backdrop-filter: blur(10px) !important;
}

.content-card.screenshots-card {
    padding: 0;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(1px) !important;
}

.screenshots-card:hover {
    background: rgba(255, 255, 255, 0.01) !important;
}

.screenshots-card .card-title {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 3;
    margin-bottom: 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
    text-align: center;
}

.screenshots-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Секція інструкцій - проста структура як у спільноти */
.instructions-card {
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01) !important; /* Менша прозорість фону */
    backdrop-filter: blur(10px) !important;
}

.content-card.instructions-card {
    padding: 0;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(1px) !important;
}

.instructions-card:hover {
    background: rgba(255, 255, 255, 0.01) !important;
}

.instructions-card .card-title {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 3;
    margin-bottom: 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.instructions-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.instructions-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.instructions-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.instruction-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background-size: contain; /* Було cover, тепер contain */
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 20px;
}

.instruction-slide img {
    display: none;
}

.instruction-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
    color: white;
    padding: 20px 25px 25px;
    text-align: center;
}

.instruction-overlay h3 {
    font-size: 1.2rem;
    color: #FFC107;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 700;
}

.instruction-overlay p {
    font-size: 0.95rem;
    line-height: 1.4;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    font-weight: 500;
}

.instruction-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.25);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.instruction-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.instruction-nav.prev { left: 15px; }
.instruction-nav.next { right: 15px; }

/* Автослайдер скріншотів */
.auto-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    animation: autoSlide 20s infinite linear;
}

.screenshot-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    background-size: contain; /* Було cover, тепер contain */
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
}

.screenshot-slide img {
    display: none;
}

@keyframes autoSlide {
    0% { transform: translateX(0); }
    10% { transform: translateX(0); }
    20% { transform: translateX(-100%); }
    30% { transform: translateX(-200%); }
    40% { transform: translateX(-300%); }
    50% { transform: translateX(-400%); }
    60% { transform: translateX(-500%); }
    70% { transform: translateX(-600%); }
    80% { transform: translateX(-700%); }
    90% { transform: translateX(-800%); }
    100% { transform: translateX(-900%); }
}

/* Спільнота */
.community-container,
.community-card {
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01) !important; /* Менша прозорість фону */
    backdrop-filter: blur(10px) !important;
}

.content-card.community-card {
    padding: 0;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(1px) !important;
}

.community-card:hover {
    background: rgba(255, 255, 255, 0.01) !important;
}

.community-link {
    display: block;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease;
    height: 300px;
    width: 100%;
    background: transparent;
}

.community-link:hover {
    transform: scale(1.02);
    background: transparent;
}

.community-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 20px;
    border-radius: 15px;
}

.community-text h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
    font-weight: 700;
}

.community-text p {
    font-size: 1rem;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8);
    color: #34495e;
}

/* Історія */
.story-card {
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01) !important; /* Менша прозорість фону */
    backdrop-filter: blur(10px) !important;
}

.content-card.story-card {
    padding: 0;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(1px) !important;
}

.story-card:hover {
    background: rgba(255, 255, 255, 0.01) !important;
}

.story-content {
    color: #2c3e50;
    text-align: center;
    height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: transparent;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.story-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
    font-weight: 700;
}

.story-content p {
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.6;
    color: #34495e;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8);
}

/* Футер */
.footer {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-content {
    color: white;
}

.footer-content p {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #FFC107;
}

/* Адаптивність для планшетів */
@media (max-width: 768px) {
    .main-container {
        max-width: 100%;
        padding: 15px;
    }
    
    .content-sections {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }
    
    .content-card {
        height: auto;
        min-height: 300px;
        padding: 20px;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: center;
        max-width: 100%;
        gap: 10px;
    }
    
    .social-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .hero-video {
        width: 300px;
        height: 225px;
    }
    
    .game-title {
        font-size: 2.4rem;
    }
    
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .logo-container {
        flex: 1;
    }
    
    .language-switcher {
        position: absolute;
        top: 0;
        right: 0;
        transform: scale(0.85);
        transform-origin: top right;
    }
    
    .hero-section {
        display: block;
        text-align: center;
    }
    
    .video-container {
        margin-bottom: 30px;
    }
    
    .play-button-container {
        display: block;
    }
    
    .play-button {
        font-size: 1.2rem;
        padding: 15px 35px;
    }
}

/* Адаптивність для мобільних */
@media (max-width: 480px) {
    .main-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 10px;
        position: relative;
    }
    
    .logo-container {
        flex: 1;
    }
    
    .language-switcher {
        position: absolute;
        top: 0;
        right: 0;
        transform: scale(0.75);
        transform-origin: top right;
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .game-title {
        font-size: 2.2rem;
    }
    
    .hero-video {
        width: 250px;
        height: 188px;
    }
    
    .hero-section {
        display: block;
        text-align: center;
    }
    
    .video-container {
        margin-bottom: 30px;
    }
    
    .play-button-container {
        display: block;
    }
    
    .play-button {
        font-size: 1rem;
        padding: 12px 25px;
    }
    
    .content-sections {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }
    
    .content-card {
        padding: 15px;
        height: auto;
        min-height: 280px;
    }
    
    .card-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .content-card {
        height: 300px;
        min-height: 300px;
    }
    
    .instructions-container,
    .instructions-slider,
    .screenshots-container,
    .auto-slider,
    .community-link,
    .story-content {
        height: 100%;
        min-height: 100%;
    }
    
    .instruction-slide,
    .screenshot-slide,
    .community-image {
        height: 100%;
    }
    
    .instructions-card .card-title,
    .screenshots-card .card-title {
        font-size: 1.4rem;
        top: 15px;
    }
    
    .instruction-overlay {
        padding: 12px 20px 18px 20px;
    }
    
    .instruction-overlay h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .instruction-overlay p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .instruction-nav {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .instruction-nav.prev { left: 10px; }
    .instruction-nav.next { right: 10px; }
    
    .social-buttons {
        flex-direction: column;
        gap: 8px;
        max-width: 100%;
    }
    
    .social-btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        justify-content: center;
    }
}

/* Горизонтальне розташування для десктопу */
@media (min-width: 1024px) {
    .hero-section {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 50px;
        text-align: left;
        max-width: 1000px;
    }
    
    .video-container {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .play-button-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .hero-video {
        width: 450px;
        height: 338px;
    }
    
    .play-button {
        font-size: 1.6rem;
        padding: 25px 55px;
    }
}

/* Анімації завантаження */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-card {
    animation: fadeIn 0.8s ease-out;
}

.content-card:nth-child(1) { animation-delay: 0.1s; }
.content-card:nth-child(2) { animation-delay: 0.2s; }
.content-card:nth-child(3) { animation-delay: 0.3s; }
.content-card:nth-child(4) { animation-delay: 0.4s; }

/* Кнопка паузи */
.pause-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    background: rgba(0,0,0,0.35); /* напівпрозорий чорний */
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.pause-btn:hover, .pause-btn:focus {
    background: rgba(0,0,0,0.55);
    outline: none;
}

.pause-btn svg {
    width: 26px;
    height: 26px;
    fill: #fff;
    opacity: 0.85;
}

@media (max-width: 480px) {
    .pause-btn {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
    .pause-btn svg {
        width: 20px;
        height: 20px;
    }
}