:root {
    /* Premium Color Palette */
    --primary-hue: 220;
    --primary: hsl(var(--primary-hue), 90%, 56%);
    --primary-dark: hsl(var(--primary-hue), 90%, 40%);
    --accent: hsl(280, 85%, 60%);
    --background: #0f172a;
    --surface: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-lg: 24px;
    --radius-md: 16px;

    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    background-attachment: fixed;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

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

.nav-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-main);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-fast);
    border-radius: 2px;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero-text {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin: 1.5rem 0 2.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(0);
    transition: var(--transition-smooth);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

/* Apps Grid */
.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.app-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.app-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.app-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.app-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.app-link {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-link span {
    transition: transform 0.2s;
}

.app-link:hover span {
    transform: translateX(4px);
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0;
    margin-top: 4rem;
    background: rgba(15, 23, 42, 0.5);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Mobile menu implementation usually needs JS, keeping simple for now or scrollable */

    /* Simple mobile nav override */
    .nav-links {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 1rem;
        justify-content: space-evenly;
        /* Changed from space-around for fewer items */
        border-top: 1px solid var(--glass-border);
        z-index: 1000;
    }

    .nav-item {
        font-size: 0.8rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    header {
        justify-content: center;
    }

    .hide-mobile {
        display: none;
    }

    /* Adjust main content padding for bottom nav */
    main {
        padding-bottom: 80px;
    }

    footer {
        padding-bottom: 100px;
    }
}