@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Inter:wght@400;600;800&display=swap');

:root {
    /* Minimalist / App Theme */
    /* Exact colors: Paradise Teal #00FFA3 -> Paradise Blue #00A3FF */
    --primary-gradient: linear-gradient(135deg, #00FFA3 0%, #00A3FF 100%);
    --accent-color: #ffca28;
    --background-color: #ffffff;
    --text-color: #1a1a1a;
    --border-color: #eaeaea;

    --font-heading: 'Pacifico', cursive;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    /* Slightly lighter gradient for dark mode readability if needed, but keeping brand colors first */
    --primary-gradient: linear-gradient(135deg, #00FFA3 0%, #00A3FF 100%);
    --accent-color: #ffe082;
    --background-color: #252525;
    --text-color: #F0F0F0;
    --border-color: #555;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    line-height: 1.3;
    /* SLIGHTLY TIGHTER LINE HEIGHT */
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Fixed Sleek Toggle */
.theme-toggle-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: rgba(128, 128, 128, 0.1);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Hero & Content */
.hero {
    text-align: center;
    padding: 30px 0 20px;
    /* Relaxed padding */
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    /* Slightly larger again */
    margin-bottom: 15px;
    /* More breathing room */
    font-weight: 400;

    /* Gradient Text */
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    padding-right: 0.2em;
    padding-bottom: 0.4em;
    /* Increased to prevent 'y' clipping */
    line-height: 1.3;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 30px;
    /* Increased margin */
    margin-top: 0;
}

/* Screenshots - Centered and Clean */
.preview-section {
    margin-bottom: 40px;
    /* Relaxed margin */
    overflow-x: auto;
    white-space: nowrap;
    padding: 15px 0;
    /* Relaxed padding */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.preview-section::-webkit-scrollbar {
    display: none;
}

.screenshot-container {
    display: inline-flex;
    gap: 15px;
    justify-content: center;
    padding: 0 10px;
    /* Fallback for very small screens */
}

.screenshot-card {
    display: inline-block;
    width: 170px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

[data-theme="dark"] .screenshot-card {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.screenshot-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.screenshot-card img {
    width: 100%;
    display: block;
}

/* Dark Mode Image Toggling */
.screenshot-card .img-dark {
    display: none;
}

.screenshot-card .img-light {
    display: block;
}

[data-theme="dark"] .screenshot-card .img-light {
    display: none;
}

[data-theme="dark"] .screenshot-card .img-dark {
    display: block;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.store-badge {
    height: 55px;
    transition: opacity 0.2s, transform 0.2s;
}

.store-badge:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    /* Relaxed padding */
    margin-top: 30px;
    /* Relaxed margin */
    font-size: 0.85rem;
    opacity: 0.5;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-color);
}

/* CGU Specifics */
.legal-content {
    padding: 40px 0;
}

.legal-content h1 {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 2.5rem;
    color: var(--text-color);
    background: none;
    -webkit-text-fill-color: initial;
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .hero {
        padding-top: 40px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .container {
        padding: 0 15px;
    }

    .theme-toggle-wrapper {
        top: 15px;
        right: 15px;
    }

    .screenshot-card {
        width: 140px;
        /* Smaller on mobile to try to fit 2x2 or scroll */
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 500px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.2s;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
    /* Above nav */
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

.screenshot-card img {
    cursor: zoom-in;
}