@import url('https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,400&display=swap');

/* General styles */
body {
    font-family: 'Playfair Display', serif; /* Fantasy font for Genshin feel */
    margin: 0;
    background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e); /* Starry night gradient like Teyvat skies */
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* Particles container */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* Behind content */
}

/* Star animation layer for twinkling stars in Teyvat style */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 5s infinite alternate;
    opacity: 0.8;
}

.star:nth-child(1) { top: 10%; left: 20%; width: 2px; height: 2px; animation-delay: 0s; }
.star:nth-child(2) { top: 20%; left: 40%; width: 3px; height: 3px; animation-delay: 1s; }
.star:nth-child(3) { top: 30%; left: 60%; width: 1px; height: 1px; animation-delay: 2s; }
.star:nth-child(4) { top: 40%; left: 80%; width: 4px; height: 4px; animation-delay: 0.5s; }
.star:nth-child(5) { top: 50%; left: 10%; width: 2px; height: 2px; animation-delay: 1.5s; }
.star:nth-child(6) { top: 60%; left: 30%; width: 3px; height: 3px; animation-delay: 2.5s; }
.star:nth-child(7) { top: 70%; left: 50%; width: 1px; height: 1px; animation-delay: 3s; }
.star:nth-child(8) { top: 80%; left: 70%; width: 4px; height: 4px; animation-delay: 3.5s; }
.star:nth-child(9) { top: 90%; left: 90%; width: 2px; height: 2px; animation-delay: 4s; }
.star:nth-child(10) { top: 15%; left: 5%; width: 3px; height: 3px; animation-delay: 4.5s; }

@keyframes twinkle {
    0% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0.5; transform: scale(1); }
}

/* Header styles */
.site-header {
    background-color: rgba(28, 35, 49, 0.8); /* Semi-transparent for overlay on particles */
    color: #fff;
    padding: 20px;
    position: fixed;
    width: 100%;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.site-header:hover {
    background-color: rgba(28, 35, 49, 1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    color: #FFD700; /* Gold for Genshin rarity */
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); /* Glowing effect */
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 15px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #FFD700;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #FFD700;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero section styles */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: url('https://artur-petrov.vinnica.ua/public/img/gacha-simulator/main/start.jpg');
    background-position: center;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay for readability */
    z-index: 1;
}

.hero-container {
    max-width: 900px;
    text-align: center;
    z-index: 2;
    padding: 40px;
    border-radius: 20px;
    background: rgba(15, 12, 41, 0.7); /* Ethereal dark background */
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3); /* Golden glow */
    animation: pulse 2s infinite alternate;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.hero-container.fade-in {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse {
    0% { box-shadow: 0 0 50px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 0 70px rgba(255, 215, 0, 0.5); }
}

.hero-title {
    font-size: 60px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #FFD700;
    text-shadow: 0 0 15px #FFD700;
}

.hero-description {
    font-size: 26px;
    margin-bottom: 40px;
    line-height: 1.6;
    font-family: 'Montserrat', sans-serif;
}

.hero-button {
    display: inline-block;
    background: linear-gradient(45deg, #42b883, #35495e);
    color: #fff;
    font-size: 26px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 20px 40px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 20px rgba(66, 184, 131, 0.5);
}

.hero-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(66, 184, 131, 0.8);
}

/* Features section styles - More dynamic with parallax and staggered animations */
.features-section {
    padding: 80px 50px;
    background: linear-gradient(to bottom, #24243e, #302b63, #0f0c29); /* Inverted gradient for contrast */
    position: relative;
}

.parallax-bg {
    background-attachment: fixed; /* Parallax effect */
    background-image: url('https://example.com/teyvat-background.jpg'); /* Replace with a Teyvat-inspired image */
    background-size: cover;
}

.section-title {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    color: #FFD700;
    margin-bottom: 60px;
    text-shadow: 0 0 10px #FFD700;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.section-title.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    justify-items: center;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1); /* Glassmorphism effect */
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    padding: 40px;
    flex-basis: calc(33.33% - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 15px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(50px);
}

.feature-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.feature-card-1.fade-in { transition-delay: 0.2s; }
.feature-card-2.fade-in { transition-delay: 0.4s; }
.feature-card-3.fade-in { transition-delay: 0.6s; }

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.7); /* Enhanced golden hover glow */
}

.feature-image {
    height: 180px;
    width: 180px;
    margin-bottom: 25px;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-image {
    transform: rotate(15deg) scale(1.15);
}

.feature-title {
    font-size: 28px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 15px;
    text-shadow: 0 0 5px #FFD700;
}

.feature-description {
    font-size: 20px;
    color: #ddd;
    line-height: 1.6;
    font-family: 'Montserrat', sans-serif;
}

/* Footer - Rearranged for better accessibility, with fade-in */
.footer {
    background-color: rgba(28, 35, 49, 0.9);
    color: #fff;
    padding: 60px 0;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.footer.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start; /* Better alignment for accessibility */
}

.footer-col {
    flex-basis: 100%;
    margin-bottom: 40px;
}

.footer-col1 {
    flex-basis: 50%; /* Wider for about text */
}

.footer-col3 {
    flex-basis: 40%;
}

.footer-logo {
    margin-right: 15px;
    height: 60px;
    width: 60px;
    animation: spin 10s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer-about {
    font-size: 16px;
    margin-top: 25px;
    font-family: 'Montserrat', sans-serif;
}

.footer-title {
    font-size: 22px;
    margin-bottom: 25px;
    color: #FFD700;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-list li {
    margin-bottom: 15px;
}

.footer-list a {
    color: #ddd;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.footer-list a:hover {
    color: #FFD700;
}
