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

:root {
    --primary: #1976D2;
    --primary-dark: #1565C0;
    --primary-light: #42A5F5;
    --accent: #7C4DFF;
    --bg: #F8F9FA;
    --surface: #FFFFFF;
    --surface-elevated: #F0F2F5;
    --text: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-muted: #9a9ab0;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --radius-lg: 24px;
    --nav-height: 70px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #0a0a0f;
    --surface: #121218;
    --surface-elevated: #1a1a24;
    --text: #E8E8F0;
    --text-secondary: #9a9ab0;
    --text-muted: #5a5a7a;
    --border: rgba(255, 255, 255, 0.06);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

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

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

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .header.scrolled {
    background: rgba(10, 10, 15, 0.85);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 24px;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.nav-link:hover {
    background: var(--surface-elevated);
    color: var(--text);
}

/* ===== Language Toggle ===== */
.lang-toggle {
    background: var(--surface-elevated);
    border: none;
    border-radius: 10px;
    height: 36px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    transition: all var(--transition);
    font-family: inherit;
}

.lang-toggle:hover {
    color: var(--primary);
    background: var(--border);
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    background: var(--surface-elevated);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all var(--transition);
    position: relative;
}

.theme-toggle:hover {
    color: var(--primary);
    background: var(--border);
}

.theme-toggle i {
    position: absolute;
    transition: all var(--transition);
}

.theme-toggle .fa-moon { opacity: 1; transform: rotate(0) scale(1); }
.theme-toggle .fa-sun { opacity: 0; transform: rotate(90deg) scale(0); }

[data-theme="dark"] .theme-toggle .fa-moon { opacity: 0; transform: rotate(-90deg) scale(0); }
[data-theme="dark"] .theme-toggle .fa-sun { opacity: 1; transform: rotate(0) scale(1); }

/* ===== Menu Toggle ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px 80px;
}

/*
    Hero background image — replace assets/hero-bg.jpg with your own.
    Fallback: solid color when image fails to load.
*/
.hero-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-elevated);
    opacity: 0.15;
}

[data-theme="dark"] .hero-bg-image {
    opacity: 0.08;
}

.hero-inner {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(25, 118, 210, 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 24px;
    border: 1px solid rgba(25, 118, 210, 0.15);
}

.hero-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.accent-text {
    color: var(--primary);
}

.hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.35);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.45);
}

.btn-outline {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Hero Stats ===== */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* ===== Phone Mockup ===== */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: #1a1a2e;
    border-radius: 40px;
    padding: 12px;
    position: relative;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 30px 80px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .phone-mockup {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.08),
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #1a1a2e;
    border-radius: 0 0 18px 18px;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #0D1117;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/*
    Put your real app screenshot here.
    Uncomment the .phone-screenshot div in HTML to show your image
    and hide the simulated UI below.
*/
.phone-screenshot {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    z-index: 3;
}

.phone-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 600;
}

.phone-icons {
    display: flex;
    gap: 4px;
    font-size: 10px;
}

.phone-app {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px 12px 0;
}

.phone-app-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.phone-app-header i {
    color: var(--primary-light);
}

.phone-email-display {
    background: rgba(25, 118, 210, 0.1);
    border: 1px solid rgba(25, 118, 210, 0.2);
    border-radius: 12px;
    padding: 12px;
    margin: 12px 0;
}

.phone-email-addr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.addr-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-family: monospace;
}

.phone-email-addr i {
    color: var(--primary-light);
    font-size: 12px;
    cursor: pointer;
}

.phone-email-actions {
    display: flex;
    gap: 6px;
}

.phone-btn {
    flex: 1;
    text-align: center;
    padding: 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.phone-btn i {
    font-size: 10px;
}

.refresh-btn {
    background: rgba(25, 118, 210, 0.15);
    color: var(--primary-light);
}

.new-btn {
    background: var(--primary);
    color: white;
}

.phone-inbox {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0;
}

.phone-inbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.phone-inbox-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-light);
    margin-top: 5px;
    flex-shrink: 0;
}

.phone-inbox-dot.read {
    background: rgba(255, 255, 255, 0.15);
}

.phone-inbox-content {
    flex: 1;
    min-width: 0;
}

.phone-inbox-from {
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.phone-inbox-subj {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-inbox-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2px;
}

.phone-bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 10px 0 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
}

.phone-bottom-nav i:first-child {
    color: var(--primary-light);
}

/* ===== Sections Common ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== Features Section ===== */
.features {
    padding: 100px 24px;
    position: relative;
}

.carousel-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.feature-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(25, 118, 210, 0.15);
}

/*
    Feature card image — uncomment in HTML and link to your screenshot.
    Dimensions: 16:9 ratio recommended, ~600x338px.
*/
.feature-card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-elevated);
    margin-bottom: 24px;
}

.feature-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-list li i {
    color: #4CAF50;
    font-size: 14px;
}

/* ===== Swiper Overrides ===== */
.swiper {
    padding-bottom: 50px;
}

.swiper-slide {
    height: auto;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--text-muted);
    opacity: 0.3;
    transition: all 0.3s;
}

.swiper-pagination-bullet-active {
    width: 28px;
    border-radius: 5px;
    background: var(--primary);
    opacity: 1;
}

/* ===== Download Section ===== */
.download {
    padding: 100px 24px;
    position: relative;
    overflow: hidden;
}

/*
    Download section background image — optional.
    Uncomment in HTML and link to your image.
*/
.download-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-elevated);
    opacity: 0.1;
}

[data-theme="dark"] .download-bg-image {
    opacity: 0.06;
}

.download-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.download-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px;
    border: 1px solid var(--border);
    text-align: center;
}

.download-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.download-os-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: #3DDC84;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
}

.download-version {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.version-tag {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.version-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--surface-elevated);
    padding: 2px 10px;
    border-radius: 100px;
}

.download-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-item i {
    color: var(--primary-light);
}

.download-release-info {
    margin-bottom: 20px;
    min-height: 40px;
}

.release-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.release-info-loaded {
    background: var(--surface-elevated);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: left;
}

.release-info-loaded .ri-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.release-info-loaded .ri-body {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.release-error {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.download-btn {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
}

.download-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.download-note a {
    color: var(--primary);
    font-weight: 600;
}

.download-note a:hover {
    text-decoration: underline;
}

.download-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.df-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.df-item:hover {
    border-color: rgba(25, 118, 210, 0.2);
    transform: translateX(4px);
}

.df-item i {
    color: #4CAF50;
    font-size: 16px;
}

/*
    Download showcase image — optional section to display app screenshots.
    Uncomment in HTML.
*/
.download-showcase {
    max-width: 600px;
    margin: 60px auto 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* ===== Footer ===== */
.footer {
    padding: 60px 24px 30px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.footer-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--primary);
}

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

/* ===== Fade-in Animation ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        margin: 0 auto 32px;
    }

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

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

    .hero-visual {
        order: -1;
        margin-bottom: 20px;
        transform: scale(0.85);
    }

    .phone-mockup {
        width: 250px;
        height: 500px;
    }

    .download-content {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .nav {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 12px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }

    .nav.open {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 16px 40px;
    }

    .phone-mockup {
        width: 220px;
        height: 440px;
    }

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

    .section-header {
        margin-bottom: 40px;
    }
}
