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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Header and Hero */
header {
    position: relative;
    overflow: hidden;
}

.heading {
    text-align:center;
}

.hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 900px;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/hero.gif');
    background-size: cover;
    background-position: center;
    transform: translateZ(0);
    will-change: transform;
}

/* Logo */
.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.logo img {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

/* Menu */
.menu {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10;
}

.menu ul {
    display: flex;
    list-style: none;
    align-items: center;
}

.menu li {
    margin-left: 30px;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.menu a:hover {
    color: #ff00ff;
    transform: scale(1.05);
}

/* Volume Slider */
.volume-control {
    display: flex;
    align-items: center;
}

.volume-slider-container {
    width: 10px;
    height: 80px;
    position: relative;
    cursor: pointer;
    margin: 0 15px;
}

.volume-slider-track {
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
}

.volume-slider-fill {
    width: 100%;
    background-color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 5px;
    height: 0%; /* Will be set by JavaScript */
}

.volume-slider-handle {
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    bottom: 0; /* Will be set by JavaScript */
    transform: translate(-50%, 50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
}

.volume-slider-container:hover .volume-slider-handle {
    transform: translate(-50%, 50%) scale(1.1);
}

/* Main Content */
main {
    position: relative;
    z-index: 1;
    background-color: #f8f8f8;
}

.section {
    padding: 5rem 10%;
    margin: 0 auto;
    max-width: 1400px;
}

/* Description Section */
.description {
    text-align: center;
    padding-top: 8rem;
}

.tagline {
    font-size: 1.8rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Inspired By Section */
.inspiration-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.inspiration-item {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.inspiration-item:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.inspiration-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.inspiration-item h3, .inspiration-item p {
    padding: 0 1.5rem;
}

.inspiration-item h3 {
    margin-top: 1.5rem;
}

.inspiration-item p {
    margin-bottom: 1.5rem;
}

.inspiration-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Towers Section */
.towers-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.tower-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tower-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
}

.tower-item h3, .tower-item p {
    padding: 0 1.5rem;
}

.tower-item h3 {
    margin-top: 1.5rem;
}

.tower-item p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Get It Section */
.get-it {
    text-align: center;
    background-color: #f0f0f0;
}

.store-link {
    display: flex;
    justify-content: center;
}

.meta-button {
    display: flex;
    align-items: center;
    background-color: #1877f2;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.meta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.meta-button img {
    height: 30px;
    margin-right: 10px;
}

/* Privacy Policy Section */
.privacy-policy {
    max-width: 800px;
    margin: 0 auto;
    padding: 5rem 5%;
}

.privacy-policy h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.privacy-policy .last-updated {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
}

.privacy-policy h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #444;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.privacy-policy ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.privacy-policy li {
    margin-bottom: 0.8rem;
}

.privacy-policy strong {
    color: #333;
}

/* Screenshots Section */
.screenshots {
    padding: 0; /* No padding as specified */
    overflow: hidden;
}

.screenshots-carousel {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    position: relative;
    /* Remove transition to prevent snapping during position resets */
    will-change: transform; /* Optimize for animations */
}

.carousel-slide {
    flex: 0 0 auto;
    width: 300px;
    height: 200px;
    margin: 0 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/*.carousel-slide:hover {*/
/*    transform: scale(1.05);*/
/*}*/

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Screenshot Popup */
.screenshot-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.popup-content {
    max-width: 2560px; /* Maximum width as specified */
    width: 90%;
    margin: 0 auto;
    text-align: center;
}

#popup-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* Trailer Section */
.trailer {
    text-align: center;
}

.trailer-subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 2rem;
    margin-top:-2rem;
}

.trailer-container {
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.trailer-video {
    width: 100%;
    aspect-ratio: 3/2;
    display: block;
    object-fit: cover;
}

/* Reviews Section */
.reviews {
    padding: 3rem 10%;
}

.review-banner {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    color: white;
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stars {
    font-size: 2.5rem;
    color: #ffdd00;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

blockquote {
    font-size: 1.8rem;
    font-style: italic;
    margin-bottom: 1rem;
}

cite {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Cursor Follower */
.cursor-follower {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    pointer-events: none;
}

.defender-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    transform-origin: center;
    transition: transform 0.1s ease;
}

#defender {
    width: 100%;
    height: 100%;
}

.laser-spawn-point {
    position: absolute;
    top: 8px; /* 10% of the defender's height (80px) from the top */
    left: 40px; /* Center of the defender */
    width: 0;
    height: 0;
    background-color: transparent;
}

#laser-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem;
}

/* Animation Classes */
.bounce {
    animation: bounce 0.545s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-10px);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-container {
        max-height: 700px;
    }

    .hero-image {
        background-image: url('assets/hero-mobile.gif');
        background-position: top center;
    }

    .section {
        padding: 3rem 5%;
    }

    .menu ul {
        flex-direction: column;
        align-items: flex-end;
    }

    .menu li {
        margin: 5px 0;
    }

    .inspiration-container, .towers-container {
        gap: 1rem;
    }

    #defender-wrapper, #laser-canvas {
        display: none;
    }
}
