:root {
    --bg-dark: #050505;
    /* Apple-style light gray background */
    --glass-bg: rgba(28, 28, 30, 0.45);
    --glass-border: rgba(255, 255, 255, 0.12);
    --accent-primary: #007aff;
    --accent-secondary: #ff375f;
    --accent-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --text-primary: #ffffff;
    --text-secondary: rgba(235, 235, 245, 0.6);
    --liquid-1: #5e11ff;
    --liquid-2: #ff2d55;
    --liquid-3: #007aff;
    --container-width: 1200px;
    --radius-lg: 32px;
    --radius-md: 20px;
}

/* Noise overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05;
    pointer-events: none;
    z-index: 1000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html,
body {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Liquid Background --- */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.6;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: move 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--liquid-1);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--liquid-2);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 100px) scale(1.2);
    }
}

/* --- Header Floating Pill --- */
.header-wrapper {
    position: sticky;
    top: 20px;
    z-index: 1000;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.floating-pill {
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    backdrop-filter: blur(25px) saturate(180%);
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid var(--glass-border);
    height: 64px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    /* Reduce background blobs on mobile */
    .background-blobs {
        opacity: 0.45;
        filter: blur(60px);
    }

    .blob-1 {
        width: 250px;
        height: 250px;
    }

    .blob-2 {
        width: 200px;
        height: 200px;
    }

    .blob-3 {
        width: 150px;
        height: 150px;
    }

    .glass-sphere {
        width: 220px;
        height: 220px;
    }
}

.menu-toggle {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
}

.glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    backdrop-filter: blur(30px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(35, 35, 35, 0.5);
    transform: translateY(-5px);
}

/* --- Typography --- */
.gradient-text {
    font-size: 4.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
}

/* --- Header & Nav --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #fff;
    color: #000;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- Sections --- */
.hero {
    padding: 120px 0 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 40px;
}

.hero-content {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
}


.features {
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-item {
    padding: 40px;
    text-align: center;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #fff;
}

.feature-item h3 {
    margin-bottom: 12px;
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 80px 0;
    }

    .hero-visual {
        order: -1;
    }

    .subtitle {
        margin: 0 auto 40px;
    }

    .hero-actions {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

.apps-section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 24px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* --- Filters --- */
.filters {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 16px;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;
    /* Hide for IE/Edge */
    max-width: 100%;
    white-space: nowrap;
}

.filters::-webkit-scrollbar {
    display: none;
    /* Hide for Chrome/Safari */
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Grid & App Cards --- */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.app-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.app-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1a1a1a, #333);
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-info h3 {
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.app-meta {
    display: flex;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* Added gap to prevent small blocks from sticking */
    margin-bottom: 16px;
}

.tag {
    background: rgba(0, 122, 255, 0.15);
    color: #0084ff;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.app-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Shimmer */
.app-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.05) 50%, transparent 55%);
    transform: rotate(30deg);
    transition: all 0.6s ease;
    pointer-events: none;
}

.app-card:hover::after {
    left: 100%;
    top: 100%;
}

/* --- FAQ --- */
.faq-section {
    padding: 80px 0;
}

.faq-header {
    padding: 40px;
    margin-bottom: 32px;
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: flex-start;
}


.faq-item {
    padding: 0;
    cursor: pointer;
    overflow: hidden;
}

.faq-question {
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: background 0.3s;
}

.faq-item:hover .faq-question {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question h3 {
    margin-bottom: 0;
    color: var(--accent-primary);
    font-size: 1.25rem;
    transition: color 0.3s;
}

.faq-question i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-content {
    overflow: hidden;
    padding: 0 32px;
}

.faq-answer-content p {
    padding-bottom: 32px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Active State */
.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--text-primary);
}

.faq-item.active .faq-question h3 {
    color: #fff;
}

/* --- Footer --- */
.glass-footer {
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-info h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.copyright {
    margin-top: 16px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-secondary);
    transition: color 0.3s;
}

.social-links a:hover {
    color: #fff;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 800px;
    padding: 40px;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.reviews-container {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.reviews-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.reviews-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    color: #666;
    gap: 12px;
}

.spin {
    animation: spin 1s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .modal-content {
        padding: 40px 20px 20px;
    }

    .reviews-container {
        height: 80vh;
    }
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Remove hover shift for modal specifically */
.modal-content.glass-card:hover {
    transform: none;
    background: var(--glass-bg);
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-app-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.modal-app-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
}

/* --- Side Menu Drawer --- */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    /* Stronger background blur when menu is open */
    transition: opacity 0.4s ease, visibility 0.4s ease;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.side-menu.active {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}

.side-menu-content {
    position: absolute;
    right: -100%;
    /* Slide in from right */
    top: 20px;
    bottom: 20px;
    width: 70%;
    max-width: 260px;
    background: rgba(15, 15, 15, 0.4);
    /* Darker glass tint */
    -webkit-backdrop-filter: blur(100px) saturate(200%);
    backdrop-filter: blur(100px) saturate(200%);
    /* Ultra heavy glass blur */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px 0 0 30px;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.4);
}

.side-menu.active .side-menu-content {
    right: 0;
}

.side-menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-side-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

.side-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.side-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    /* Slightly smaller for compactness */
    font-weight: 600;
    transition: color 0.3s, transform 0.2s;
    display: block;
}

.side-nav-links a:hover,
.side-nav-links a.active {
    color: #fff;
    transform: translateX(5px);
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.download-options .btn:hover {
    transform: none !important;
}

/* --- Utility Classes --- */
.mobile-only {
    display: none;
}

@media (max-width: 992px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .gradient-text {
        font-size: 2.1rem;
        letter-spacing: -1px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 24px;
        gap: 16px;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    .filters {
        width: 100%;
        margin-left: 0;
        padding: 0;
        background: transparent;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        white-space: normal;
        overflow: visible;
    }

    .filter-btn {
        flex: 1 1 auto;
        text-align: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--glass-border);
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .filter-btn.active {
        background: var(--accent-gradient);
        border-color: transparent;
    }

    .app-card {
        padding: 20px;
    }

    .faq-question {
        padding: 20px 24px;
    }

    .faq-question h3 {
        font-size: 1rem;
        line-height: 1.3;
    }

    .faq-answer-content {
        padding: 0 24px;
    }

    .faq-answer-content p {
        font-size: 0.85rem;
        padding-bottom: 24px;
    }

    .app-info h3 {
        font-size: 1.2rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}