:root {
    --bg: #f3f5fb;
    --card: #ffffff;
    --primary: #4f46e5;
    --primary-strong: #7c3aed;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    --surface: #f9fafb;
    --surface-alt: #f3f4f6;
    --radius-lg: 20px;
    --radius-md: 14px;
    --glass-bg: rgba(255, 255, 255, 0.62);
    --glass-bg-strong: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-blur: 16px;
    --glass-glow: rgba(99, 102, 241, 0.26);
}

[data-theme="dark"] {
    --bg: #0b1020;
    --card: #131a2b;
    --primary: #818cf8;
    --primary-strong: #a78bfa;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #24324a;
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    --surface: #162136;
    --surface-alt: #1b2942;
    --glass-bg: rgba(19, 26, 43, 0.58);
    --glass-bg-strong: rgba(22, 33, 54, 0.7);
    --glass-border: rgba(148, 163, 184, 0.24);
    --glass-glow: rgba(129, 140, 248, 0.2);
}

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

body {
    font-family: Inter, "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(79, 70, 229, 0.12), transparent 45%),
        radial-gradient(circle at 90% 20%, rgba(124, 58, 237, 0.08), transparent 40%),
        var(--bg);
    color: var(--text);
    letter-spacing: 0.01em;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    filter: blur(48px);
    opacity: 0.45;
}

body::before {
    top: -120px;
    right: -140px;
    background: radial-gradient(circle, var(--glass-glow), transparent 62%);
}

body::after {
    bottom: -160px;
    left: -150px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 64%);
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 20px;
}

/* Glassmorphism Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    margin-top: 20px;
    background: linear-gradient(145deg, var(--glass-bg-strong), var(--glass-bg));
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    position: sticky;
    top: 20px;
    z-index: 100;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Custom Dropdown Styling */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dropdown-btn:hover, .dropdown-btn[aria-expanded="true"] {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.dropdown-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    color: var(--muted);
}

.dropdown-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(145deg, var(--glass-bg-strong), var(--glass-bg)), var(--card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    padding: 8px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border: none;
    background: transparent;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.dropdown-item:hover, .dropdown-item.active {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    color: var(--primary);
    width: 24px;
    height: 24px;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-graphics {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .hero {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        padding: 100px 20px;
    }
    .hero-content {
        max-width: 55%;
    }
    .hero-graphics {
        max-width: 45%;
        margin-top: 0;
    }
    .actions {
        justify-content: flex-start !important;
    }
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    color: var(--muted);
    max-width: 650px;
    margin: 0 auto 40px;
}

@media (min-width: 768px) {
    .hero p {
        margin: 0 0 40px 0;
    }
}

/* Shared Components */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -130%;
    width: 56%;
    height: 100%;
    transform: skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transition: left 0.45s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.32);
    filter: saturate(1.05);
}

.btn-primary:hover::after {
    left: 130%;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.15));
    color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.18s ease, background 0.18s ease;
    margin-left: 16px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: var(--surface-alt);
}

.actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

@media (max-width: 480px) {
    .btn-secondary {
        margin-left: 0;
    }
    .actions .btn-primary, .actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
    nav {
        flex-direction: column;
        gap: 16px;
    }
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin: 80px 0 40px;
    background: linear-gradient(135deg, var(--text), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glass Cards */
.card {
    background: linear-gradient(145deg, var(--glass-bg-strong), var(--glass-bg)), var(--card);
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.32), transparent 34%, transparent 62%, rgba(255, 255, 255, 0.08));
    opacity: 0.45;
}

.card:hover {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--glass-border) 55%, var(--primary));
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.12);
}

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

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-icon {
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    color: var(--primary);
    border: 1px solid var(--glass-border);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    position: relative;
    z-index: 2;
}

.card p {
    font-size: 15px;
    color: var(--muted);
    position: relative;
    z-index: 2;
}

/* Team Section */
.team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.team-card {
    text-align: center;
    padding: 40px 24px;
    cursor: default;
}

.team-card:hover {
    transform: translateY(-4px);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.team-role {
    font-size: 13px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Why WebApp Section */
.why-webapp {
    margin: 80px 0;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* Page Headers for sub-pages */
.page-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-content {
    max-width: 800px;
    margin: 0 auto 60px;
    font-size: 18px;
    color: var(--muted);
    line-height: 1.8;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-graphics svg {
    max-width: 100%;
    height: auto;
    width: 360px;
    filter: drop-shadow(0 20px 30px rgba(79, 70, 229, 0.15));
    position: relative;
    z-index: 2;
}

footer {
    text-align: center;
    padding: 60px 20px 40px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 40px;
    }
    .page-header h1 {
        font-size: 36px;
    }
}
