/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Tech Color Palette - Dark Theme */
    --primary-color: #0066ff;
    --secondary-color: #00d4ff;
    --accent-color: #6366f1;
    --dark-bg: #0a0e27;
    --darker-bg: #050816;
    --light-text: #ffffff;
    --gray-text: #94a3b8;
    --card-bg: rgba(15, 23, 42, 0.8);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Space Grotesk', var(--font-primary);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(0, 102, 255, 0.3);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --primary-color: #0052cc;
    --secondary-color: #0088cc;
    --accent-color: #5b5fc7;
    --dark-bg: #f8fafc;
    --darker-bg: #ffffff;
    --light-text: #0f172a;
    --gray-text: #475569;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px rgba(0, 102, 255, 0.2);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--darker-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    color: var(--gray-text);
    margin-bottom: var(--spacing-sm);
}

/* ===== UTILITIES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    margin-bottom: var(--spacing-sm);
}

.section-title p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-2);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/decorative/hero-bg-dark.jpg');  /* 深色主题背景 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Light theme uses different background image */
[data-theme="light"] .hero-background {
    background-image: url('../images/decorative/hero-bg-light.jpg');  /* 浅色主题背景 */
}

/* Dark overlay for dark theme - ensures text readability */
.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(15, 23, 42, 0.75) 50%,
        rgba(0, 51, 102, 0.8) 100%);
    z-index: 1;
}

/* Light overlay for light theme - gradient from white to transparent */
[data-theme="light"] .hero-background::before {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 30%,
        rgba(255, 255, 255, 0.70) 60%,
        rgba(255, 255, 255, 0.50) 100%);
}

.hero-background::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    bottom: -200px;
    left: -200px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 2;  /* Above background overlay */
    text-align: center;
    max-width: 900px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.hero-title {
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 1s ease;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-text);
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 1s ease 0.4s both;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: var(--light-text);  /* 确保文字颜色正确 */
}

.feature-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.feature-badge i {
    color: var(--secondary-color);
    font-size: 1.25rem;
}

/* Light theme feature badge */
[data-theme="light"] .feature-badge {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--light-text);
}

[data-theme="light"] .feature-badge:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--gradient-2);
    color: white !important;  /* 蓝色背景始终用白色文字 */
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 102, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--light-text) !important;  /* 深色主题：浅色文字 */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: white !important;
}

.btn-group {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--light-text);
}

.card-description {
    color: var(--gray-text);
    margin-bottom: var(--spacing-sm);
}

/* ===== GRID LAYOUTS ===== */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== PRODUCTS SECTION ===== */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--gradient-2);
    color: white !important;  /* 始终白色，因为背景是蓝色 */
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.product-features {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-features li i {
    color: var(--secondary-color);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-column h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--light-text);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-bg);
        flex-direction: column;
        padding: var(--spacing-md);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .btn-group {
        flex-direction: column;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===== SCROLL EFFECTS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* ===== THEME & LANGUAGE TOGGLE ===== */
.settings-toggle {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toggle-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--light-text) !important;
    font-size: 1.25rem;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

.toggle-btn:hover {
    background: var(--primary-color);
    transform: translateX(-5px);
    border-color: var(--primary-color);
    color: white !important;
}

.toggle-btn span {
    font-size: 0.875rem;
    font-weight: 600;
    display: none;
}

.toggle-btn:hover span {
    display: inline;
}

/* Theme Toggle Icon Animation */
.theme-icon {
    transition: transform 0.5s ease;
}

[data-theme="light"] .theme-icon {
    transform: rotate(180deg);
}

/* Language Toggle */
.lang-text {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lang-icon {
    font-size: 1rem;
}

/* Light theme button adjustments */
[data-theme="light"] .toggle-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-right: none;
    color: var(--light-text) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .settings-toggle {
        right: 0;
        bottom: 80px;
        top: auto;
        transform: none;
        flex-direction: row;
    }

    .toggle-btn {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }

    .toggle-btn span {
        display: none !important;
    }
}

/* Smooth theme transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card, .navbar, .footer {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Light theme specific adjustments */
[data-theme="light"] .hero-background::before,
[data-theme="light"] .hero-background::after {
    opacity: 0.1;
}

[data-theme="light"] .card {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .footer {
    background: #f1f5f9;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .social-link {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .social-link:hover {
    background: var(--primary-color);
    color: white;
}

/* Ensure all buttons have proper text color in both themes */
.btn,
.btn-primary,
.btn-secondary,
.toggle-btn,
.scroll-top-btn {
    color: var(--light-text) !important;
}

.btn-primary {
    color: white !important;
}

.btn-secondary:hover {
    color: white !important;
}

/* Light theme button adjustments */
[data-theme="light"] .btn-primary {
    color: white !important;  /* 蓝色背景在浅色主题下也用白色文字 */
}

[data-theme="light"] .btn-secondary {
    background: rgba(255, 255, 255, 0.4);  /* 半透明白色 */
    color: #1e293b !important;  /* 深色文字 */
    border: 2px solid rgba(30, 41, 59, 0.6);  /* 深色边框 */
    backdrop-filter: blur(10px);  /* 模糊背景 */
}

[data-theme="light"] .btn-secondary:hover {
    background: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
}
/* ===== FORM STYLES ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--light-text);
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.08);
}

textarea {
    resize: vertical;
}

/* Light theme form styles */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--light-text);
}

[data-theme="light"] input[type="text"]:focus,
[data-theme="light"] input[type="email"]:focus,
[data-theme="light"] input[type="tel"]:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.05);
}

/* Form labels */
label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light-text);
    font-weight: 500;
}

/* Social link fixes for contact page */
.social-link {
    transition: all 0.3s ease;
}

[data-theme="light"] .social-link[style*="background: white"] {
    background: white !important;
    color: #0052cc !important;
}
