:root {
    /* 浅色模式变量 */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    --text-primary: #1a202c;
    --text-secondary: #64748b;
    --text-inverse: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --border-color: rgba(102, 126, 234, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    /* 深色模式变量 */
    --bg-primary: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    --bg-secondary: #1a202c;
    --bg-tertiary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --text-inverse: #f7fafc;
    --header-bg: rgba(26, 32, 44, 0.95);
    --card-bg: #2d3748;
    --border-color: rgba(102, 126, 234, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.6);
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    min-height: 80px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    height: auto;
    min-height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

.theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

[data-theme="light"] .theme-toggle {
    border: 2px solid #cbd5e0;
    background: #ffffff;
}

[data-theme="light"] .theme-toggle:hover {
    border-color: #667eea;
}

[data-theme="dark"] .theme-toggle {
    border: 2px solid #4a5568;
    background: #2d3748;
}

[data-theme="dark"] .theme-toggle:hover {
    border-color: #667eea;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
    border-color: #667eea;
}

.theme-toggle i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

.hero {
    padding: 180px 0 120px;
    text-align: center;
    color: var(--text-inverse);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.section {
    padding: 80px 0;
    background: var(--bg-secondary);
    transition: background 0.3s ease;
}

.section:nth-child(even) {
    background: var(--bg-tertiary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-item {
    background: var(--card-bg);
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.tech-item i {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    transition: all 0.3s ease;
}

.tech-item h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.tech-item p {
    color: var(--text-secondary);
}

/* 不同技术栈的主题色 */
.tech-nextjs::before { background: linear-gradient(135deg, #000000, #1a1a1a); }
.tech-nextjs i { color: #000000; }

.tech-tailwind::before { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.tech-tailwind i { color: #06b6d4; }

.tech-typescript::before { background: linear-gradient(135deg, #3178c6, #2563eb); }
.tech-typescript i { color: #3178c6; }

.tech-player::before { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.tech-player i { color: #ff6b6b; }

.tech-docker::before { background: linear-gradient(135deg, #2496ed, #0078d4); }
.tech-docker i { color: #2496ed; }

.tech-redis::before { background: linear-gradient(135deg, #dc382d, #c53030); }
.tech-redis i { color: #dc382d; }

.tech-pwa::before { background: linear-gradient(135deg, #5a67d8, #667eea); }
.tech-pwa i { color: #5a67d8; }

.tech-api::before { background: linear-gradient(135deg, #38a169, #48bb78); }
.tech-api i { color: #38a169; }

.deployment-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.deployment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}

.deployment-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.deployment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.deployment-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(102, 126, 234, 0.2);
}

.deployment-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
}

.deployment-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.1;
}

.deployment-header h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.deployment-header p {
    position: relative;
    z-index: 1;
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.deployment-body {
    padding: 2rem 1.5rem;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.deployment-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.deployment-feature {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.code-block {
    background: linear-gradient(145deg, #1a202c, #2d3748);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    margin: 1rem 0;
    border: 1px solid #374151;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    flex: 1;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
    z-index: 2;
}

.code-title {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27ca3f; }

.post-deployment-config {
    margin-top: 3rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.post-deployment-config::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.config-header {
    display: flex;
    align-items: center;
    padding: 2.5rem 2rem 1.5rem;
    background: var(--bg-tertiary);
    transition: background 0.3s ease;
}

.config-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.config-title h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.config-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
}

.config-steps {
    padding: 1rem 2rem 2rem;
}

.config-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    position: relative;
}

.config-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 22px;
    top: 45px;
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, #667eea 0%, rgba(102, 126, 234, 0.3) 100%);
}

.step-number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
}

.step-content {
    flex: 1;
    padding-top: 0.2rem;
}

.step-content h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

.config-note {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0 2rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.config-note i {
    color: #667eea;
    font-size: 1.5rem;
}

.config-note span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.upstash-steps {
    margin: 1.5rem 0;
}

.upstash-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: background 0.3s ease;
}

.upstash-step i {
    color: #667eea;
    width: 20px;
    text-align: center;
}

.upstash-step span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.upstash-step a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.upstash-step a:hover {
    text-decoration: underline;
}

.warning {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem 0;
    color: var(--text-secondary);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.warning i {
    color: #f39c12;
    margin-right: 0.5rem;
}

.important-notice {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(248, 113, 113, 0.1));
    border: 2px solid #dc2626;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    color: var(--text-primary);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
}

[data-theme="dark"] .important-notice {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(248, 113, 113, 0.2));
    border-color: #f87171;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.25);
}

.important-notice i {
    color: #dc2626;
    margin-right: 0.8rem;
    font-size: 1.2rem;
    vertical-align: middle;
}

[data-theme="dark"] .important-notice i {
    color: #f87171;
}

.important-notice strong {
    color: #dc2626;
    font-size: 1.1rem;
}

[data-theme="dark"] .important-notice strong {
    color: #f87171;
}

.important-list {
    margin-left: 1.5rem;
    margin-top: 0.8rem;
    padding-left: 0;
}

.important-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #f7fafc;
    text-align: center;
    padding: 4rem 0 0;
    position: relative;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #f7fafc;
}

[data-theme="dark"] footer {
    background: linear-gradient(135deg, #0f1419 0%, #1a202c 100%);
    color: #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: #a78bfa;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer-section a:hover {
    color: #a78bfa;
    transform: translateX(4px);
}

.footer-section a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
    color: #a78bfa;
}

.footer-section a:hover::before {
    opacity: 1;
    left: -16px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #a78bfa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(167, 139, 250, 0.2);
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    margin: 1.5rem 0 0 0;
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
    font-size: 0.85rem;
}

.footer-subtitle {
    margin-top: 0.4rem;
    color: #a0aec0;
    font-size: 0.75rem;
    opacity: 0.8;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .deployment-options {
        gap: 1.5rem;
    }
    
    .deployment-body {
        padding: 1.5rem 1rem;
    }
    
    .code-block {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    nav {
        padding: 1.5rem 0;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo i {
        display: inline-block;
    }
    
    .nav-right {
        gap: 0;
    }
    
    .theme-toggle {
        width: 40px !important;
        height: 40px !important;
        transform: none !important;
    }
    
    .theme-toggle:hover {
        transform: none !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .deployment-options {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .deployment-card {
        border-radius: 12px;
    }
    
    .deployment-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .deployment-body {
        padding: 1.5rem 1rem;
    }
    
    .code-block {
        font-size: 0.8rem;
        padding: 1rem;
    }
    
    .config-header {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem 1rem;
    }
    
    .config-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .config-steps {
        padding: 1rem;
    }
    
    .config-step {
        flex-direction: column;
        text-align: center;
    }
    
    .config-step::after {
        display: none;
    }
    
    .step-number {
        margin: 0 0 1rem 0;
    }
    
    .config-note {
        margin: 0 1rem 2rem;
        flex-direction: column;
        text-align: center;
    }
}