:root {
    --primary-color: #007AFF;
    --secondary-color: #5AC8FA;
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --transition-speed: 0.3s;

    /* Light Theme (Default) */
    --bg-color: #f2f2f7;
    --text-color: #1d1d1f;
    --secondary-text: #6e6e73;
    --glass-bg: rgba(235, 235, 235, 0.72);
    --glass-border: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.1);
    --hero-bg: radial-gradient(circle at center, rgba(0, 122, 255, 0.08) 0%, transparent 70%);
}

@media (prefers-color-scheme: dark) {
    :root:not(.theme-light) {
        --bg-color: #000000;
        --text-color: #f5f5f7;
        --secondary-text: #86868b;
        --glass-bg: rgba(0, 0, 0, 0.72);
        --glass-border: rgba(255, 255, 255, 0.1);
        --card-bg: #1c1c1e;
        --card-border: rgba(255, 255, 255, 0.1);
        --hero-bg: radial-gradient(circle at center, rgba(0, 122, 255, 0.15) 0%, transparent 70%);
    }
}

/* Manual Overrides */
.theme-light {
    --bg-color: #f2f2f7;
    --text-color: #1d1d1f;
    --secondary-text: #6e6e73;
    --glass-bg: rgba(235, 235, 235, 0.72);
    --glass-border: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.1);
    --hero-bg: radial-gradient(circle at center, rgba(0, 122, 255, 0.08) 0%, transparent 70%);
}

.theme-dark {
    --bg-color: #000000;
    --text-color: #f5f5f7;
    --secondary-text: #86868b;
    --glass-bg: rgba(0, 0, 0, 0.72);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-bg: #1c1c1e;
    --card-border: rgba(255, 255, 255, 0.1);
    --hero-bg: radial-gradient(circle at center, rgba(0, 122, 255, 0.15) 0%, transparent 70%);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity var(--transition-speed);
}

a:hover {
    opacity: 0.8;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    height: 32px;
    width: 32px;
}

.logo-container span {
    font-weight: 600;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Custom Language Selector */
.custom-language-selector {
    position: relative;
    display: flex;
    align-items: center;
}

.flag-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    line-height: 1;
}

.flag-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-dark .flag-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.flag-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.flag-dropdown.hidden {
    display: none;
}

.flag-dropdown button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
}

.flag-dropdown button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-dark .flag-dropdown button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Theme Toggle */
.theme-button {
    background: none;
    border: 1px solid var(--glass-border);
    padding: 6px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-light .sun-icon {
    display: none;
}

.theme-light .moon-icon {
    display: block;
}

.theme-dark .sun-icon {
    display: block;
}

.theme-dark .moon-icon {
    display: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 0;
    background: var(--hero-bg);
}

.hero h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-main {
    font-size: 6rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    font-size: 4.8rem;
    /* Adjusted to visually match width of Finderless */
    font-weight: 600;
    opacity: 0.9;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    color: var(--secondary-text);
    margin-bottom: 40px;
    max-width: 600px;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    padding: 16px 32px;
    border-radius: 980px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, background 0.3s;
}

.cta-button:hover {
    transform: scale(1.05);
    background: #0062cc;
    opacity: 1;
}

/* Features Section */
.features {
    padding: 100px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px;
    transition: transform 0.3s, background-color var(--transition-speed);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.theme-dark .feature-card {
    box-shadow: none;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.feature-card p {
    color: var(--secondary-text);
}

.feature-video {
    width: 100%;
    border-radius: 12px;
    margin-top: auto;
    background: #000;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

/* About Section */
.about-section {
    padding: 100px 40px;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.about-section h2 {
    font-size: 3rem;
    margin-bottom: 24px;
}

.about-section p {
    font-size: 1.25rem;
    color: var(--secondary-text);
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.stats-grid h4 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stats-grid p {
    font-size: 1rem;
    color: var(--secondary-text);
}

/* Footer */
footer {
    padding: 80px 40px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-links div h4 {
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--secondary-text);
    letter-spacing: 0.1em;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-color);
    font-size: 1rem;
}

.language-dropdown-container select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-color);
    font-family: inherit;
    cursor: pointer;
}

.copyright {
    margin-top: 60px;
    color: var(--secondary-text);
    font-size: 0.9rem;
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-right {
        gap: 16px;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .stats-grid {
        gap: 40px;
    }
}