:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #ec4899 0%, #f43f6e 100%);
    --gradient-3: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-4: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-5: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --gradient-6: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.container {
    width: 100%;
    max-width: 1400px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 1rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.app-card:hover::before {
    opacity: 0.1;
}

.app-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.app-card:hover h3 {
    color: var(--text-primary);
}

.app-card:hover .app-desc {
    color: var(--text-secondary);
}

/* App Icon */
.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.app-card:hover .app-icon {
    transform: scale(1.1) rotate(5deg);
}

.app-icon svg {
    width: 48px;
    height: 48px;
}

.icon-bg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: stroke 0.3s ease;
}

/* App Card Typography */
.app-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: color 0.3s ease, background-clip 0.3s ease;
}

.app-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0;
    transition: color 0.3s ease;
}

/* Staggered Animation */
.app-card:nth-child(1) { animation: fadeInUp 0.4s ease-out 0.1s both; }
.app-card:nth-child(2) { animation: fadeInUp 0.4s ease-out 0.15s both; }
.app-card:nth-child(3) { animation: fadeInUp 0.4s ease-out 0.2s both; }
.app-card:nth-child(4) { animation: fadeInUp 0.4s ease-out 0.25s both; }
.app-card:nth-child(5) { animation: fadeInUp 0.4s ease-out 0.3s both; }
.app-card:nth-child(6) { animation: fadeInUp 0.4s ease-out 0.35s both; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .app-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Focus States for Accessibility */
.app-card:focus-visible,
.hero h1:focus-visible,
.hero p:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
    border-radius: 8px;
}
