/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-bg: #1a1a1a;
    --secondary-bg: #2a2a2a;
    --tertiary-bg: #3a3a3a;
    --accent-color: #ffc107;
    --accent-hover: #e0a800;
    --text-primary: #f0f0f0;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #3a3a3a;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --shadow-heavy: rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

/* Basic Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #1e1e1e 100%);
    color: var(--text-primary);
    font-weight: 400;
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 16px;
    }
}

/* Header */
header {
    background: var(--secondary-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 20px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-medium);
}

header:hover {
    box-shadow: 0 4px 30px var(--shadow-medium);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Logo link styling - no hover effects */
.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.logo-link:hover {
    text-decoration: none;
    color: inherit;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 2px 8px var(--shadow-light));
}

header .logo {
    margin: 0;
    padding: 0;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    background: none; /* Remove gradient background */
    -webkit-background-clip: unset; /* Reset background-clip */
    -webkit-text-fill-color: var(--text-primary); /* Set to pure white */
    background-clip: unset;
    text-decoration: none;
}

header .logo-link,
header .logo-link:hover,
header .logo-link:focus {
    color: var(--text-primary); /* Keep logo text color consistent */
    background: transparent; /* Remove background change on hover */
    transform: none; /* Remove any transform on hover */
    text-decoration: none; /* Ensure no underline */
}

header .logo-link::before,
header .logo-link:hover::before {
    content: none; /* Remove the underline pseudo-element */
}

.nav-and-lang {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto; /* Push to the right */
}

header nav {
    flex-grow: 0;
    text-align: right;
}

header ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
}

header ul li {
    position: relative;
}

header a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

header a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all var(--transition-medium);
    transform: translateX(-50%);
}

header a:hover {
    color: var(--accent-color);
    background: rgba(255, 193, 7, 0.1);
    transform: translateY(-2px);
}

header a:hover::before {
    width: 100%;
}

.lang-switcher {
    display: flex;
    align-items: center;
}

.lang-button {
    background: linear-gradient(135deg, var(--accent-color), #ffb300);
    color: var(--primary-bg);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    position: relative;
    overflow: hidden;
}

.lang-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-medium);
}

.lang-button:hover::before {
    left: 100%;
}

.lang-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.4);
}

.lang-button:active {
    transform: translateY(0) scale(1);
}

/* Removed .lang-icon styles since icon was removed from HTML */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ffb300 50%, #ff8f00 100%);
    color: var(--primary-bg);
    text-align: center;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="none"><path d="M0,20 C300,80 700,0 1000,60 L1000,100 L0,100 Z" fill="rgba(0,0,0,0.05)"/></svg>') bottom center/cover no-repeat;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    background: var(--primary-bg);
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all var(--transition-medium);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: #000;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--secondary-bg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 193, 7, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 193, 7, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.features .container {
    position: relative;
    z-index: 2;
}

.features h3 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-primary);
    position: relative;
}

.features h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color), #ffb300);
    border-radius: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background: var(--tertiary-bg);
    padding: 40px 32px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-medium);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 193, 7, 0.1);
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color), #ffb300);
}

.feature-item::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.05) 0%, transparent 70%);
    transition: all 0.6s ease;
    transform: scale(0);
}

.feature-item:hover::after {
    transform: scale(1.5);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-heavy);
    border-color: rgba(255, 193, 7, 0.3);
}

.feature-item h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-color);
    position: relative;
    z-index: 2;
}

.feature-item p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    position: relative;
    z-index: 2;
}

/* Content Section (for Terms and Privacy) */
.content-section {
    padding: 50px 0;
    background: var(--secondary-bg);
    position: relative;
}

/* Language content containers */
#chinese-content, #english-content {
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

#english-content {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.02em;
}

#chinese-content {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

.content-section .container {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.content-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 50px;
    text-align: center;
    color: var(--accent-color);
    position: relative;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color), #ffb300);
    border-radius: 2px;
}

.content-section h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-left: 20px;
    border-left: 4px solid var(--accent-color);
    position: relative;
}

.content-section h3::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, var(--accent-color), #ffb300);
    border-radius: 2px;
}

.content-section p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: justify;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.content-section ul {
    list-style: none;
    margin-bottom: 25px;
    padding-left: 0;
}

.content-section ul li {
    margin-bottom: 12px;
    padding-left: 30px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    position: relative;
}

.content-section ul li::before {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.content-section a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.content-section a:hover {
    border-bottom-color: var(--accent-color);
}

/* Footer */
footer {
    background: var(--primary-bg);
    color: var(--text-primary);
    text-align: center;
    padding: 30px 0 20px; /* Reduced padding */
    border-top: 1px solid var(--border-color);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(135deg, transparent, var(--accent-color), transparent);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .logo-title {
        order: 0;
    }

    .nav-and-lang {
        order: 1;
        flex-direction: column;
        gap: 0.75rem;
        margin-left: 0;
    }

    header nav {
        order: 0;
    }

    .lang-switcher {
        order: 1;
    }

    header ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero {
        padding: 80px 0 60px;
    }

    .hero h2 {
        margin-bottom: 20px;
    }

    .hero p {
        margin-bottom: 30px;
    }

    .features {
        padding: 60px 0;
    }

    .features h3 {
        margin-bottom: 40px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .feature-item {
        padding: 30px 24px;
    }

    .content-section {
        padding: 60px 0;
    }

    .content-section h2 {
        margin-bottom: 40px;
    }

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

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .header-container {
        gap: 0.5rem;
    }

    header .logo {
        font-size: 1.5rem;
    }

    .header-logo {
        height: 32px;
    }

    .lang-button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .hero {
        padding: 60px 0 40px;
    }

    .btn-primary {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .features {
        padding: 50px 0;
    }

    .feature-item {
        padding: 25px 20px;
    }

    .content-section {
        padding: 50px 0;
    }

    .content-section p,
    .content-section ul li {
        font-size: 1rem;
        text-align: left;
    }
}
