/* CSS Variables for theming */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #e0e7ff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --accent-primary: #6366f1;
    --accent-secondary: #a21caf;
}

/* Dark mode variables */
body.dark-mode {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-gradient-start: #1f2937;
    --bg-gradient-end: #312e81;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* 高级优雅整体页面样式 */
body {
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(120deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    letter-spacing: 0.01em;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.shadow-lg {
    box-shadow: 0 8px 32px rgba(60, 60, 120, 0.12), 0 1.5px 4px rgba(60, 60, 120, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
}

header {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(60, 60, 120, 0.07);
    border-bottom: 1px solid #e0e7ff;
}

footer {
    background: rgba(255, 255, 255, 0.85);
    border-top: 1px solid #e0e7ff;
    box-shadow: 0 -2px 8px rgba(60, 60, 120, 0.07);
}

textarea,
input[type="text"] {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: box-shadow 0.2s, border-color 0.2s;
    font-size: 1rem;
    color: #222;
    box-shadow: 0 1px 2px rgba(60, 60, 120, 0.04);
}

textarea:focus,
input[type="text"]:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px #6366f133;
    outline: none;
}

button {
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(60, 60, 120, 0.08);
    transition: transform 0.12s, box-shadow 0.18s;
}

button:active {
    transform: scale(0.97);
    box-shadow: 0 1px 4px rgba(60, 60, 120, 0.10);
}

.rounded-2xl {
    border-radius: 18px !important;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 8px;
}

/* 注释区美化 */
.text-sm b {
    font-size: 1.02em;
    padding: 0 2px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Tab Navigation Styles */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tab-button:hover {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.tab-button.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation Styles */
nav.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    background: var(--accent-primary);
    color: white;
    transform: rotate(180deg);
}

/* Card Hover Effects */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

/* Testimonial Cards */
.testimonial-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

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

/* Statistics Counter Animation */
.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Section Gradient */
.hero-gradient {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(162, 28, 175, 0.1) 100%);
}

/* Button Hover Effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.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.5s ease;
    z-index: -1;
}

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

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 40;
    animation: slideDown 0.3s ease;
}

.mobile-menu.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger Icon */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Pulse Animation for Stats */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .desktop-menu {
        display: none;
    }
    
    .tab-nav {
        overflow-x: auto;
        scrollbar-width: thin;
    }
    
    .tab-button {
        white-space: nowrap;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 6px;
    }

    .shadow-lg {
        padding: 10px;
    }

    textarea,
    input[type="text"] {
        font-size: 0.98rem;
    }
    
    .hero-gradient {
        padding: 2rem 1rem;
    }
}