/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0F172A;
    color: #FFFFFF;
    overflow-x: hidden;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0F172A;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #374151;
    border-top: 3px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Landing Page (mobile-first) */
.landing-page {
    position: relative;
    background-color: #0F172A;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    z-index: 1;
    color: #F9FAFB;
}

.lp-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}

.lp-hero {
    background: radial-gradient(1200px 400px at 50% -200px, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0) 70%),
        radial-gradient(800px 300px at 0% -100px, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0) 70%);
    padding: 32px 0 8px 0;
}

.lp-brand {
    text-align: center;
}

.lp-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    background: linear-gradient(135deg, #1E293B, #0F172A);
    padding: 12px;
    object-fit: contain;
}

/* Placeholder for app icon until real one is provided */
.lp-logo-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    background: linear-gradient(135deg, #3B82F6, #10B981);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: #FFFFFF;
}

.lp-title {
    font-size: 28px;
    font-weight: 800;
    margin: 16px 0 8px;
    line-height: 1.15;
}

.lp-subtitle {
    font-size: 16px;
    color: #D1D5DB;
    max-width: 680px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

.lp-store-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Store badges as official image buttons */
.lp-store-badge {
    display: inline-block;
    text-decoration: none;
    padding: 0;
    border: 0;
    background: transparent;
    min-width: 0;
}

.lp-store-badge:hover {
    opacity: 0.9;
}

/* Ensure images size nicely and don't stretch */
.lp-store-badge img,
.store-badge-img {
    height: 40px;
    width: auto;
    display: block;
}

.lp-main {
    padding: 0px 0 24px;
}

.lp-feature-section {
    padding: 0px 0;
}

.lp-feature-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.lp-feature {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
}

.lp-feature-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.lp-feature-text {
    color: #D1D5DB;
    line-height: 1.6;
    font-size: 14px;
}

.lp-shot {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.lp-shot-placeholder {
    width: 100%;
    height: 220px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(16, 185, 129, 0.25));
    border: 1px dashed rgba(255, 255, 255, 0.25);
}

.lp-shot figcaption {
    color: #D1D5DB;
    margin-top: 8px;
    font-size: 13px;
}

/* Real screenshot styling */
.lp-shot-img {
    width: 85%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.lp-shot-img {
    -webkit-user-drag: none;
    user-select: none;
}

/* Ensure hidden images are not displayed */
.lp-shot-img[hidden] {
    display: none !important;
}

/* Carousel styling */
.lp-carousel {
    position: relative;
}

.lp-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.75) 0%, rgba(71, 85, 105, 0.75) 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.7);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    line-height: 0;
    padding: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.lp-carousel-btn[hidden] {
    display: none !important;
}

.lp-carousel-btn.prev {
    left: 8px;
}

.lp-carousel-btn.next {
    right: 8px;
}

.lp-carousel-btn:hover {
    filter: brightness(1.05) saturate(1.1);
}

.lp-carousel-btn:active {
    transform: translateY(-50%) scale(0.96);
}

/* Per-image caption */
.lp-shot-caption {
    color: #D1D5DB;
    margin-top: 6px;
    font-size: 13px;
    text-align: center;
    display: block;
}

.lp-shot-caption[hidden] {
    display: none !important;
}

/* Hide arrows when switching to 3-up layout */
@media (min-width: 1024px) {
    .lp-carousel-btn {
        display: none;
    }
}

/* On large screens, show all screenshots side by side */
@media (min-width: 1024px) {
    .lp-carousel {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
        gap: 8px 16px;
        justify-items: center;
        align-items: start;
    }

    .lp-carousel .lp-shot-img {
        grid-row: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
        display: block;
    }

    .lp-carousel .lp-shot-caption {
        grid-row: 2;
        width: 100%;
        display: block;
    }

    .lp-carousel .lp-shot-img[hidden],
    .lp-carousel .lp-shot-caption[hidden] {
        display: block !important;
    }
}

.lp-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0 24px;
    margin-top: auto;
}

.lp-footer-text {
    color: #9CA3AF;
    text-align: center;
    margin: 0 0 8px;
    font-size: 13px;
}

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

.lp-footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 13px;
}

.lp-footer-links a:hover {
    text-decoration: underline;
    color: #E5E7EB;
}

/* Responsive layout tweaks */
@media (min-width: 640px) {
    .lp-title {
        font-size: 32px;
    }

    .lp-subtitle {
        font-size: 18px;
    }
}

@media (min-width: 768px) {
    .lp-feature-block {
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .lp-title {
        font-size: 36px;
    }

    .lp-feature-block {
        flex-direction: column;
        align-items: stretch;
    }
}
