@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --brand-blue-dark: #0c3758;
    --brand-blue-mid: #154c75;
    --brand-yellow: #ffeb3b;
    --brand-yellow-hover: #fdd835;
    --brand-accent: #2196f3;

    /* Light Theme (Default) */
    --bg-body: #f5f7fa;
    --bg-gradient: linear-gradient(180deg, #f5f7fa 0%, #e4e7eb 100%);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);

    --text-primary: #0c3758;
    --text-secondary: #546e7a;
    --text-tertiary: #90a4ae;

    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);

    --btn-store-bg: #000000;
    --btn-store-text: #ffffff;
    --btn-store-border: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-body: #0c3758;
    --bg-gradient: radial-gradient(circle at top center, #1a5685 0%, #0c3758 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);

    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.05);

    --btn-store-bg: #ffffff;
    --btn-store-text: #000000;
    --btn-store-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-text {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.header-badge {
    font-size: 11px;
    color: var(--brand-yellow);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="light"] .header-badge {
    color: var(--brand-blue-mid);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.toggle-track {
    width: 44px;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

[data-theme="light"] .toggle-track {
    background: rgba(0, 0, 0, 0.1);
}

.toggle-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .toggle-thumb {
    transform: translateX(20px);
    background: var(--brand-yellow);
}

.toggle-thumb i {
    font-size: 10px;
    color: var(--brand-blue-dark);
}

/* Layout */
.main-content {
    padding: 20px 0 60px;
}

.content-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Card */
.hero-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    margin-bottom: 32px;
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-4px);
}

.banner-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(12, 55, 88, 0.8) 100%);
}

[data-theme="light"] .hero-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.8) 100%);
}

.hero-info-bar {
    padding: 20px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.app-main-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    border: 4px solid var(--bg-body);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.app-details {
    padding-bottom: 8px;
}

.app-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.1;
}

.app-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
}

.version-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--text-secondary);
}

[data-theme="light"] .version-tag {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

.trend-tag {
    color: var(--brand-yellow);
    display: flex;
    align-items: center;
    gap: 4px;
}

[data-theme="light"] .trend-tag {
    color: #f57f17;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stat-pill {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-yellow);
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="light"] .stat-pill {
    color: var(--brand-blue-mid);
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

.provider-info {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.provider-name {
    color: var(--text-primary);
    font-weight: 600;
    margin-left: 4px;
}

/* Metrics */
.metrics-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

/* Store Buttons (Neutral Style) */
.download-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 40px;
}

.store-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);

    /* Neutral Styling for Both */
    background: var(--btn-store-bg);
    color: var(--btn-store-text);
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.store-btn i {
    font-size: 28px;
}

/* Android Icon Color */
.store-btn.android i {
    background: linear-gradient(135deg, #3ddc84 0%, #32b36b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* iOS Icon Color (White/Black) */
.store-btn.ios i {
    color: inherit;
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.btn-subtitle {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.8;
}

.btn-title {
    font-size: 16px;
    font-weight: 700;
}

/* Prominent Features (New) */
.features-prominent {
    margin-bottom: 40px;
}

.features-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--brand-yellow);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

[data-theme="light"] .features-title {
    color: var(--brand-blue-mid);
}

.features-grid-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s;
}

.feature-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .feature-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.feature-icon-box {
    width: 40px;
    height: 40px;
    background: rgba(255, 235, 59, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-yellow);
    flex-shrink: 0;
}

[data-theme="light"] .feature-icon-box {
    background: rgba(33, 150, 243, 0.1);
    color: var(--brand-blue-mid);
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-text span {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Info Card */
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--glass-shadow);
}

.info-section {
    margin-bottom: 32px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--brand-yellow);
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="light"] .info-section h3 {
    color: var(--brand-blue-mid);
}

.info-section p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.info-section strong {
    color: var(--text-primary);
}

/* Modes List */
.modes-list {
    display: grid;
    gap: 12px;
}

.mode-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

[data-theme="light"] .mode-item {
    background: rgba(0, 0, 0, 0.02);
}

.mode-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 235, 59, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-yellow);
}

[data-theme="light"] .mode-icon {
    background: rgba(33, 150, 243, 0.1);
    color: var(--brand-blue-mid);
}

.mode-text {
    display: flex;
    flex-direction: column;
}

.mode-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.mode-text span {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Feature List (Legacy) */
.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-secondary);
}

.feature-list i {
    color: var(--brand-yellow);
    margin-top: 4px;
}

[data-theme="light"] .feature-list i {
    color: var(--brand-blue-mid);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
}

.footer-inner p {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.footer-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    font-size: 12px;
    color: var(--brand-yellow);
    font-weight: 600;
}

[data-theme="light"] .footer-badges {
    background: rgba(0, 0, 0, 0.05);
    color: var(--brand-blue-mid);
}

/* Snowflakes */
.snowflake {
    color: #fff;
    font-size: 1em;
    font-family: Arial;
    position: fixed;
    top: -10%;
    z-index: 9999;
    user-select: none;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
}

@keyframes snowflakes-fall {
    0% {
        top: -10%;
    }

    100% {
        top: 100%;
    }
}

@keyframes snowflakes-shake {
    0% {
        transform: translateX(0px);
    }

    50% {
        transform: translateX(80px);
    }

    100% {
        transform: translateX(0px);
    }
}

.snowflake:nth-of-type(1) {
    left: 1%;
    animation-delay: 0s, 0s;
}

.snowflake:nth-of-type(2) {
    left: 10%;
    animation-delay: 1s, 1s;
}

.snowflake:nth-of-type(3) {
    left: 20%;
    animation-delay: 6s, .5s;
}

.snowflake:nth-of-type(4) {
    left: 30%;
    animation-delay: 4s, 2s;
}

.snowflake:nth-of-type(5) {
    left: 40%;
    animation-delay: 2s, 2s;
}

.snowflake:nth-of-type(6) {
    left: 50%;
    animation-delay: 8s, 3s;
}

.snowflake:nth-of-type(7) {
    left: 60%;
    animation-delay: 6s, 2s;
}

.snowflake:nth-of-type(8) {
    left: 70%;
    animation-delay: 2.5s, 1s;
}

.snowflake:nth-of-type(9) {
    left: 80%;
    animation-delay: 1s, 0s;
}

.snowflake:nth-of-type(10) {
    left: 90%;
    animation-delay: 3s, 1.5s;
}

/* Loading Modal */
.preparing-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.preparing-card {
    background: var(--bg-body);
    padding: 32px;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    min-width: 280px;
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--brand-yellow);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

[data-theme="light"] .spinner-ring {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--brand-blue-mid);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {

    /* Tighten Header */
    .app-header {
        padding: 8px 0;
    }

    /* Tighten Main Content */
    .main-content {
        padding: 12px 0 40px;
    }

    /* Reduce Hero Banner Height */
    .banner-container {
        height: 150px;
    }

    /* Adjust Hero Info Bar */
    .hero-info-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -50px;
        padding: 16px;
        gap: 10px;
    }

    .app-name {
        font-size: 20px;
        margin-bottom: 4px;
    }

    /* Reduce Margins */
    .hero-card {
        margin-bottom: 16px;
    }

    .stats-grid {
        justify-content: center;
        margin-bottom: 12px;
        gap: 8px;
    }

    .stat-pill {
        padding: 6px 12px;
        font-size: 12px;
    }

    .provider-info {
        margin-bottom: 12px;
    }

    .metrics-row {
        margin-bottom: 24px;
    }

    /* Existing Mobile Styles & Adjustments */
    .download-actions {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 32px;
    }

    .app-meta {
        justify-content: center;
    }

    .features-grid-list {
        grid-template-columns: 1fr;
    }
}