:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #8b5cf6; /* Violet */
    --accent-secondary: #ec4899; /* Pink */
    --accent-tertiary: #3b82f6; /* Blue */
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    line-height: 1.6;
}

/* Background Effects */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--accent-primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--accent-secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 20vw;
    height: 20vw;
    background: var(--accent-tertiary);
    opacity: 0.3;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, 40px) scale(1.1); }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    padding: 2rem 0 4rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo .dot {
    color: var(--accent-secondary);
}

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

h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

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

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

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: inherit;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(30, 41, 59, 0.9);
}

.search-bar svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.app-card:hover::before {
    transform: translateX(100%);
}

.app-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    transition: var(--transition);
}

.app-card:hover .app-icon {
    transform: scale(1.05);
}

.app-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem; /* approximate height for 2 lines */
}

.app-category {
    font-size: 0.85rem;
    color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.btn-download {
    margin-top: auto;
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-download:hover {
    background: var(--text-primary);
    color: var(--bg-color);
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
}

.social-links a {
    color: var(--text-primary);
    margin-top: 1rem;
    display: inline-block;
    text-decoration: none;
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
    color: var(--accent-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-bar {
        max-width: 100%;
    }
}
