:root {
    --bg-color: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(0, 0, 0, 0.08);
    --glass-blur: blur(16px);
    
    --c-red: #f43f5e;
    --c-orange: #f97316;
    --c-yellow: #eab308;
    --c-green: #22c55e;
    --c-cyan: #06b6d4;
    --c-blue: #3b82f6;
    --c-purple: #a855f7;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background Overlay */
.animated-background {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.12), transparent 45%),
                radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.12), transparent 45%),
                radial-gradient(circle at 80% 20%, rgba(244, 63, 94, 0.12), transparent 45%);
    z-index: -1;
    animation: backgroundShift 25s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(15deg) scale(1.1); }
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(241, 245, 249, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    padding: 1rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-content h1 {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(to right, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
}

.home-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 99px;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

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

.hero {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInDown 0.8s ease-out;
}

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

.hero h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #0f172a, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Category Sections */
.category-section {
    margin-bottom: 6rem;
    animation: fadeIn 1s ease-out;
    animation-fill-mode: both;
}

.category-section:nth-child(2) { animation-delay: 0.2s; }
.category-section:nth-child(3) { animation-delay: 0.4s; }
.category-section:nth-child(4) { animation-delay: 0.6s; }

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

.category-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.category-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
}

/* Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color, #fff);
    opacity: 0.8;
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 0 40px rgba(var(--accent-rgb), 0.12);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.15);
}

.card:hover::before {
    height: 100%;
    opacity: 0.03;
}

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(0, 0, 0, 0.07);
    border-color: var(--accent-color);
}

.card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 300;
    flex-grow: 1;
}

/* Card Colors Configuration */
.card-red { --accent-color: var(--c-red); --accent-rgb: 244, 63, 94; }
.card-orange { --accent-color: var(--c-orange); --accent-rgb: 249, 115, 22; }
.card-yellow { --accent-color: var(--c-yellow); --accent-rgb: 234, 179, 8; }
.card-green { --accent-color: var(--c-green); --accent-rgb: 34, 197, 94; }
.card-cyan { --accent-color: var(--c-cyan); --accent-rgb: 6, 182, 212; }
.card-blue { --accent-color: var(--c-blue); --accent-rgb: 59, 130, 246; }
.card-purple { --accent-color: var(--c-purple); --accent-rgb: 168, 85, 247; }

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4rem;
    background: rgba(241, 245, 249, 0.7);
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Tablet: app icon grid */
    .grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }

    .card {
        padding: 1rem 0.5rem;
        align-items: center;
        text-align: center;
        border-radius: 20px;
    }

    .card p { display: none; }

    .card-icon {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
        margin-bottom: 0.6rem;
        border-radius: 16px;
    }

    .card h4 {
        font-size: 0.8rem;
        font-weight: 500;
        line-height: 1.3;
    }
}

@media (max-width: 768px) {
    .hero h2 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .container { padding: 3rem 1.5rem; }
    .category-title { font-size: 1.5rem; }

    /* Phone: 4-column app icon grid */
    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .card {
        padding: 0.85rem 0.4rem;
        align-items: center;
        text-align: center;
        border-radius: 18px;
    }

    .card p { display: none; }

    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
        border-radius: 14px;
    }

    .card h4 {
        font-size: 0.7rem;
        font-weight: 500;
        line-height: 1.2;
    }
}
