/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a1a;
    --bg-card: #12122a;
    --bg-elevated: #1a1a3a;
    --text: #e8e8f0;
    --text-muted: #8888aa;
    --accent: #e94560;
    --accent-hover: #ff6b85;
    --accent-2: #6c5ce7;
    --accent-3: #00cec9;
    --gradient: linear-gradient(135deg, #e94560, #6c5ce7);
    --radius: 12px;
    --radius-sm: 8px;
    --container: 1000px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4 {
    line-height: 1.2;
}

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


/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 3px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a,
.nav-dropdown-btn {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown-btn:hover {
    color: var(--accent);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-top: 8px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.nav-dropdown-menu a:hover {
    color: var(--accent);
    background: rgba(233, 69, 96, 0.08);
}

.chevron {
    font-size: 10px;
    margin-left: 2px;
}

/* Mobile menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.2s;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        font-size: 20px;
        transform: translateX(100%);
        transition: transform 0.3s;
    }

    .main-nav.open {
        transform: translateX(0);
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        background: transparent;
        border: none;
        opacity: 1;
        visibility: visible;
        margin-top: 8px;
        padding: 0;
        text-align: center;
    }
}


/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(233, 69, 96, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-full {
    width: 100%;
}


/* ===== Hero ===== */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(233, 69, 96, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(108, 92, 231, 0.12) 0%, transparent 50%);
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    margin-bottom: 16px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 32px;
}

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


/* ===== Apps Grid ===== */
.apps-section,
.about-section,
.blog-preview-section,
.cta-section,
.related-posts {
    padding: 80px 0;
}

.apps-section h2,
.about-section h2,
.blog-preview-section h2,
.cta-section h2,
.app-features h2,
.app-description h2,
.app-cta h2,
.related-posts h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

@media (max-width: 500px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }
}

.app-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(233, 69, 96, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.app-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.app-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.app-card-body p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.app-card-link {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}


/* ===== About ===== */
.about-section {
    text-align: center;
    background: var(--bg-card);
}

.about-text {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}


/* ===== Blog Grid (preview + list) ===== */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-link {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.blog-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(233, 69, 96, 0.3);
}

.blog-card-meta {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.blog-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}


/* ===== CTA Section ===== */
.cta-section {
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(233, 69, 96, 0.1) 0%, transparent 60%);
}

.cta-section p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 440px;
    margin: 0 auto 24px;
}


/* ===== App Detail Pages ===== */
.app-hero {
    padding: 80px 0 40px;
    background:
        radial-gradient(ellipse at 30% 50%, color-mix(in srgb, var(--app-color) 15%, transparent) 0%, transparent 50%);
}

.app-hero-inner {
    display: flex;
    align-items: center;
    gap: 32px;
}

.app-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    flex-shrink: 0;
}

.app-tagline {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.store-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s, transform 0.2s;
}

.store-badge:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.app-screenshots {
    padding: 40px 0;
}

.screenshots-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    justify-content: center;
}

.screenshot-placeholder {
    width: 160px;
    height: 280px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--app-color) 15%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--app-color) 25%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
    scroll-snap-align: center;
}

.app-features {
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(233, 69, 96, 0.2);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.app-description {
    padding: 60px 0;
    background: var(--bg-card);
}

.app-description-text {
    max-width: 640px;
}

.app-description-text p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.app-cta {
    padding: 60px 0;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--app-color) 10%, transparent) 0%, transparent 60%);
}


/* ===== Blog Pages ===== */
.blog-header,
.contact-header {
    padding: 60px 0 32px;
}

.blog-header h1,
.contact-header h1 {
    font-size: 32px;
    font-weight: 800;
}

.blog-header p,
.contact-header p {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 8px;
}

.tag-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.tag-btn {
    padding: 6px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.tag-btn:hover,
.tag-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-list-item {
    display: block;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}

.blog-list-item:hover {
    transform: translateY(-2px);
    border-color: rgba(233, 69, 96, 0.3);
}

.blog-list-meta {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-list-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.blog-list-item p {
    font-size: 14px;
    color: var(--text-muted);
}

.blog-list-section {
    padding-bottom: 80px;
}


/* ===== Blog Post Content ===== */
.blog-list-section + main,
main {
    /* nothing needed, just a comment for structure */
}

main > h1:first-child {
    display: none; /* hide duplicate h1 from markdown */
}

/* Article styling for blog posts */
main h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 60px auto 8px;
    max-width: 640px;
    padding: 0 24px;
}

main h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 40px auto 16px;
    max-width: 640px;
    padding: 0 24px;
}

main p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto 16px;
    padding: 0 24px;
}

main ul, main ol {
    max-width: 640px;
    margin: 0 auto 16px;
    padding: 0 24px 0 48px;
    color: var(--text-muted);
}

main li {
    margin-bottom: 8px;
    line-height: 1.6;
}

main strong {
    color: var(--text);
}

main code {
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

main pre {
    max-width: 640px;
    margin: 0 auto 16px;
    padding: 20px 24px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

/* Prevent article styles from affecting section-based pages */
.hero ~ * p,
.app-hero ~ * p,
.blog-header ~ * p,
.contact-header ~ * p {
    max-width: none;
    padding: 0;
}


/* ===== Contact ===== */
.contact-header {
    text-align: center;
}

.contact-form-section {
    padding-bottom: 60px;
}

.contact-form {
    max-width: 520px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.topic-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.topic-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.topic-btn:has(input:checked) {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.topic-btn input {
    display: none;
}

.alt-contact {
    text-align: center;
    padding: 40px 0 80px;
}

.alt-contact p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

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

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: border-color 0.2s, transform 0.2s;
}

.social-link:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}


/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 48px 0 0;
    background: var(--bg-card);
}

.footer-inner {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    padding-bottom: 32px;
}

.footer-logo {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.footer-col p {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 12px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 6px;
}

.footer-col a {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 0;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

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

    .store-badges {
        justify-content: center;
    }

    .screenshots-scroll {
        justify-content: flex-start;
        padding-left: 24px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 32px;
    }
}
