:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Hide content based on language attribute */
html[lang="en"] [data-lang-content="zh"] {
    display: none !important;
}

html[lang="zh"] [data-lang-content="en"] {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    background-color: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

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

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

.nav-links a:hover {
    color: var(--primary-color);
}

.lang-switch-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.lang-switch-btn:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background-color: var(--secondary-color);
    color: var(--bg-white);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--bg-white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--bg-white);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-light {
    background-color: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

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

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

/* Cards */
.card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: #94a3b8;
    padding: 4rem 0 2rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--bg-white);
    margin-bottom: 1.5rem;
}

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

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #94a3b8;
}

.footer-col ul li a:hover {
    color: var(--bg-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Content Pages (Privacy, Terms) */
.page-header {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    color: var(--bg-white);
    margin-bottom: 0;
}

.content-section {
    background-color: var(--bg-white);
    padding: 4rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: -2rem auto 4rem auto;
    max-width: 900px;
    position: relative;
    z-index: 10;
}

.content-section h2 {
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.content-section h3 {
    margin-top: 1.5rem;
    font-size: 1.25rem;
}

.content-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info-box {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
    margin: 2rem 0;
}

.contact-info-box p {
    margin-bottom: 0.5rem;
}
.contact-info-box p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* In a real scenario we'd add a mobile menu toggle */
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}
