@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Light Mode Defaults - Premium & Clean */
    --bg-main: #f8f9fd;
    --bg-card: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --border-color: #eaeaea;

    --primary: #8e44ad;
    --primary-gradient: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    --accent: #cd84f1;
    --accent-purple: #9b59b6;

    --glow-purple: rgba(142, 68, 173, 0.3);

    --pill-bg: #f3f0f5;
    --pill-border: #e6e1e8;

    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 15px 35px rgba(142, 68, 173, 0.15);
}

/* Dark Mode Overrides - Strict Purple/Black (No Blue) */
body[data-theme='dark'] {
    --bg-main: #0a0a0a;
    --bg-card: #141414;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #2a2a2a;
    --pill-bg: #1a1a1a;
    --pill-border: #333333;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 35px rgba(142, 68, 173, 0.2);
    --primary: #9b59b6;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    background-image: none !important;
    /* Kill blue gradient */
    color: var(--text-main);
    margin: 0;
    padding-bottom: 2rem;
    transition: background-color 0.4s ease, color 0.3s ease;
}

/* --- Header --- */
.app-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s, border 0.3s;
}

body[data-theme='dark'] .app-header {
    background: rgba(20, 20, 20, 0.9);
    border-bottom-color: #2a2a2a;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.header-badge {
    font-size: 0.7rem;
    background: var(--pill-bg);
    color: #9b59b6 !important;
    /* Force Purple */
    padding: 2px 8px;
    border-radius: 6px;
    border: none;
    display: inline-flex;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-banner {
    object-fit: cover;
    transition: transform 0.5s;
}

.hero-card:hover .hero-banner {
    transform: scale(1.02);
}

body[data-theme='dark'] .hero-banner {
    opacity: 0.8;
}

/* App Icon */
.app-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: -50px auto 5px;
    /* Tighter margin */
    position: relative;
    z-index: 10;
}

.app-main-icon {
    width: 100%;
    height: 100%;
    border-radius: 22px;
    border: 4px solid var(--bg-card);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: border 0.3s;
}

body[data-theme='dark'] .app-main-icon {
    border-color: #141414;
    box-shadow: 0 0 30px rgba(142, 68, 173, 0.2);
}

.app-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.2rem;
    /* Tighter margin */
    letter-spacing: -0.5px;
}

/* Provider Info (Moved) */
.provider-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.5rem;
    /* Tighter margin */
    font-size: 0.9rem;
}

.provider-label {
    color: var(--text-muted);
    font-weight: 500;
}

.provider-name {
    color: var(--text-main);
    font-weight: 700;
}

.app-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.version-tag,
.trend-tag {
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trend-tag {
    color: var(--primary);
    background: rgba(142, 68, 173, 0.05);
    border-color: rgba(142, 68, 173, 0.15);
}

body[data-theme='dark'] .version-tag {
    background: #1a1a1a;
    border-color: #333;
}

body[data-theme='dark'] .trend-tag {
    background: rgba(142, 68, 173, 0.1);
    border-color: rgba(142, 68, 173, 0.3);
}

/* --- Stats Pills --- */
.stats-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1rem;
    /* Tighter margin */
}

.stat-pill {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

.stat-pill i {
    color: var(--primary);
}

body[data-theme='dark'] .stat-pill {
    background: #1a1a1a;
    border-color: #333;
}

/* --- Metrics --- */
.metrics-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    /* Tighter margin */
    text-align: center;
    padding: 0 1rem;
}

.metric-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.metric-divider {
    width: 1px;
    background: var(--border-color);
    height: 40px;
}

/* --- Buttons --- */
.download-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Tighter gap */
    margin-bottom: 1.5rem;
    /* Tighter margin */
}

.store-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.25);
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(142, 68, 173, 0.35);
}

.store-btn:active {
    transform: translateY(0);
}

/* --- Features --- */
.features-prominent {
    margin-top: 2rem;
}

.features-title {
    text-align: left;
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.feature-item:hover {
    transform: translateX(5px);
}

body[data-theme='dark'] .feature-item {
    background: #141414;
    border-color: #2a2a2a;
}

.feature-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: rgba(142, 68, 173, 0.1);
    font-size: 1.2rem;
}

.feature-text strong {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 2px;
}

.feature-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Info Card --- */
.info-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2rem;
    margin-top: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

body[data-theme='dark'] .info-card {
    background: #141414;
    border-color: #2a2a2a;
}

.info-section h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.info-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* --- Modes List --- */
.modes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mode-item {
    background: var(--bg-main);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

body[data-theme='dark'] .mode-item {
    background: #0a0a0a;
}

.mode-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(142, 68, 173, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    margin-top: 4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-bottom: 1rem;
}

.footer-badges {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    opacity: 0.8;
}

.footer-badges i {
    color: var(--primary);
}

/* Override any potential yellow */
.fa-star,
.fa-shield-alt {
    color: inherit !important;
}

/* --- Desktop Layout (PC Fix) --- */
@media (min-width: 768px) {
    .header-container {
        max-width: 900px;
    }

    .main-content {
        max-width: 900px;
        margin: 0 auto;
        padding: 2rem;
    }

    .content-wrapper {
        max-width: 900px;
        margin: 0 auto;
    }

    .hero-info-bar {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        text-align: left;
        padding: 0 2rem;
        margin-top: -40px;
        gap: 20px;
        justify-content: flex-start;
    }

    .app-icon-wrapper {
        margin: -50px 0 5px 0;
    }

    .app-details {
        align-items: flex-start;
        padding-bottom: 10px;
        width: auto;
    }

    .app-name {
        margin-bottom: 0.1rem;
    }

    .provider-info {
        justify-content: flex-start;
    }

    .app-meta {
        justify-content: flex-start;
    }

    .hero-card {
        text-align: left;
    }
}