/* Global background for all pages */
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    /* Background image that always fills - using both fixed and regular for compatibility */
    background: url('./assets/background.png') center center no-repeat;
    background-size: cover;
    background-attachment: scroll; /* Scroll with content on mobile */
}

/* Ensure html stretches to fill any extra space from browser UI */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific */
    html {
        min-height: -webkit-fill-available;
        height: -webkit-fill-available;
    }
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    font-family: 'Poppins', sans-serif;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Transparent background to show html background */
    background: transparent;
    padding-bottom: max(150px, env(safe-area-inset-bottom) + 100px);
    padding-top: max(60px, env(safe-area-inset-top) + 20px);
    /* Allow scrolling but prevent bounce */
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.container {
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo img {
    width: 450px !important;
    height: 450px !important;
    max-width: 90vw;
    max-height: 90vh;
    animation: logo-zoom-in-up 1s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes logo-zoom-in-up {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(40px);
    }
    60% {
        opacity: 1;
        transform: scale(1.08) translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.logo h1 {
    font-size: 4rem;
    margin: 0;
    font-weight: 700;
}

.subtitle {
    font-size: 1.5rem;
    max-width: 400px;
    margin: 0 auto 2.5rem auto;
    opacity: 0.95;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.store-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.store-button img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease-in-out, filter 0.3s ease;
    border-radius: 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.store-button:hover img {
    transform: scale(1.05) translateY(-2px);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    font-size: 0.85rem;
    text-align: center;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

footer a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    white-space: nowrap;
}

footer a:hover {
    opacity: 1;
}

footer span {
    opacity: 0.8;
    color: white;
}

/* Styles for Legal Pages */
.legal-page {
    color: #333;
    justify-content: flex-start;
}

.legal-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 800px;
    margin: 3rem auto;
    text-align: left;
}

.legal-container h1 {
    margin-top: 0;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #F85D6A;
    text-decoration: none;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 900px) {
    body {
        padding-bottom: env(safe-area-inset-bottom, 20px); /* Remove footer padding on mobile */
    }
    .container {
        max-width: 95vw;
        padding: 1rem;
    }
    .logo img {
        width: 400px !important;
        height: 400px !important;
        max-width: 85vw;
        max-height: 85vh;
    }
    .subtitle {
        font-size: 1.3rem;
        margin: 0 auto 2rem auto;
    }
    .store-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    .store-button img {
        height: 50px;
    }
    footer {
        display: none; /* Hide footer entirely on mobile screens */
    }
    .legal-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 0.5rem;
    }
    .logo img {
        width: 320px !important;
        height: 320px !important;
        max-width: 85vw;
        max-height: 85vw;
    }
    .subtitle {
        font-size: 1.1rem;
        margin: 0 auto 1.5rem auto;
    }
    footer {
        display: none; /* Hide footer entirely on small mobile screens */
    }
}