* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --bg-tertiary: #1a1a24;

    --gradient-purple: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-health: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    --gradient-life: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-defi: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);

    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

/* Header */
.app-store-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
}

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

.header-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-purple);
    border-radius: 10px;
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-purple);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Hero */
.hero {
    padding: 6rem 2rem 4rem;
    background: radial-gradient(circle at top, rgba(99, 102, 241, 0.1), transparent 50%);
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Featured Section */
.featured {
    padding: 4rem 0;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.carousel {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.featured-card {
    position: relative;
    flex: 0 0 400px;
    height: 250px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: scale(1.02);
}

.featured-gradient {
    position: absolute;
    inset: 0;
    opacity: 0.8;
}

.life-gradient {
    background: var(--gradient-life);
}

.health-gradient {
    background: var(--gradient-health);
}

.defi-gradient {
    background: var(--gradient-defi);
}

.featured-content {
    position: relative;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
}

.featured-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.featured-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    font-weight: 600;
}

.featured-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
}

.featured-info p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Apps Grid Section */
.apps-grid-section {
    padding: 4rem 0;
}

.category-section {
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-emoji {
    font-size: 2rem;
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
    gap: 1.5rem;
}

.app-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 160px;
}

.app-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.app-card.featured-app {
    border: 2px solid rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
}

.app-icon-large {
    font-size: 3rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    flex-shrink: 0;
}

.app-info {
    flex: 1;
    min-width: 0;
    /* Critical for text overflow handling */
}

.app-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.app-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lint warning fix: Added standard line-clamp property alongside -webkit-line-clamp for full browser compatibility */

.app-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.app-category {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.app-status {
    font-size: 0.75rem;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-weight: 600;
    white-space: nowrap;
}

.status-live {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-building {
    background: rgba(249, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(249, 158, 11, 0.3);
}

.install-btn {
    padding: 0.875rem 1.75rem;
    background: var(--gradient-purple);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
}

.install-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Footer */
.app-store-footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: var(--text-tertiary);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .hero-stats {
        gap: 2rem;
    }

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

    .app-card {
        padding: 1.5rem;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .install-btn {
        grid-column: 1 / -1;
        justify-self: stretch;
        text-align: center;
    }

    .featured-card {
        flex: 0 0 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .header-nav {
        display: none;
    }
}

/* Small phones - 480px */
@media (max-width: 480px) {
    .hero {
        padding: 4rem 1rem 3rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-badge {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .section-container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .category-title {
        font-size: 1.25rem;
    }

    .category-emoji {
        font-size: 1.5rem;
    }

    .featured-card {
        flex: 0 0 260px;
        height: 200px;
    }

    .featured-content {
        padding: 1.5rem;
    }

    .featured-icon {
        font-size: 2.5rem;
    }

    .featured-info h3 {
        font-size: 1.25rem;
    }

    .app-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .app-icon-large {
        width: 52px;
        height: 52px;
        font-size: 2.25rem;
    }

    .app-name {
        font-size: 1rem;
    }

    .install-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .footer-container {
        padding: 0 1rem;
    }
}

/* Extra small phones - 375px */
@media (max-width: 375px) {
    .hero {
        padding: 3.5rem 0.75rem 2.5rem;
    }

    .hero-title {
        font-size: clamp(1.5rem, 9vw, 2rem);
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .category-title {
        font-size: 1.1rem;
    }

    .featured-card {
        flex: 0 0 240px;
        height: 180px;
    }

    .app-card {
        padding: 1rem;
    }

    .app-icon-large {
        width: 46px;
        height: 46px;
        font-size: 2rem;
    }

    .app-name {
        font-size: 0.95rem;
    }

    .app-description {
        font-size: 0.8rem;
    }

    .app-meta {
        gap: 0.5rem;
    }

    .install-btn {
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }
}

/* Very small screens - 320px */
@media (max-width: 340px) {
    .hero-title {
        font-size: 1.35rem;
    }

    .hero-badge {
        padding: 0.35rem 0.75rem;
        font-size: 0.7rem;
    }

    .stat {
        flex: 1 1 40%;
    }

    .featured-card {
        flex: 0 0 220px;
        height: 160px;
    }

    .section-container {
        padding: 0 0.75rem;
    }
}