/* === 基础样式重置 === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    min-height: 100vh;
}

/* === 顶部导航栏 === */
.navbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e8eaec;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.6em;
    font-weight: 700;
    color: #1890ff;
    text-decoration: none;
    line-height: 1;
}

.logo-icon {
    font-size: 1.2em;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s;
    line-height: 1;
}

.nav-links a:hover, .nav-links a.active {
    color: #1890ff;
}

/* === 语言切换按钮 === */
.lang-switch {
    background: #f0f8ff;
    border: 1px solid #d6e4ff;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1890ff;
    margin-left: 16px;
}

.lang-switch:hover {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

/* === 英雄区域 === */
.hero {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.8em;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1em;
    margin-bottom: 32px;
    opacity: 0.9;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: white;
    color: #1890ff;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.8);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* === 主容器 === */
.main-container {
    max-width: 1200px;
    margin: -30px auto 0;
    padding: 0 20px 40px;
    position: relative;
    z-index: 10;
}

/* === 核心生成器卡片 === */
.generator-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

/* === 卡片头部 === */
.card-header {
    background: #fafbfc;
    border-bottom: 1px solid #e8eaec;
    padding: 24px 32px;
    text-align: center;
}

.card-header h2 {
    font-size: 1.5em;
    color: #262626;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-header p {
    color: #8c8c8c;
    font-size: 14px;
}

/* === 主要生成器区域 === */
.generator-main {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    min-height: 600px;
}

/* === 类型选择器 === */
.type-selector {
    background: #fafbfc;
    border-right: 1px solid #e8eaec;
    padding: 0;
}

.type-selector-title {
    padding: 20px 16px 12px;
    font-size: 13px;
    color: #8c8c8c;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e8eaec;
}

.type-list {
    list-style: none;
}

.type-item {
    border-bottom: 1px solid #f0f0f0;
}

.type-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    color: #595959;
    font-size: 14px;
}

.type-btn:hover {
    background: #f0f8ff;
    color: #1890ff;
}

.type-btn.active {
    background: #e6f7ff;
    color: #1890ff;
    border-right: 2px solid #1890ff;
}

.type-btn-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.type-btn-text {
    font-weight: 500;
}

/* === 内容编辑区域 === */
.content-editor {
    padding: 32px;
    background: white;
}

.editor-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #262626;
    font-size: 14px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #bfbfbf;
}

/* === 生成按钮 === */
.generate-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.generate-button {
    width: 100%;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-button:hover {
    background: #40a9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.generate-button:active {
    transform: translateY(0);
}

/* === 预览和下载区域 === */
.preview-section {
    background: #fafbfc;
    border-left: 1px solid #e8eaec;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 20px;
    text-align: center;
}

.qr-preview-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px dashed #d9d9d9;
    border-radius: 4px;
    padding: 32px 16px;
    margin-bottom: 24px;
    min-height: 300px;
}

.qr-canvas {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-placeholder {
    text-align: center;
    color: #bfbfbf;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.placeholder-text {
    font-size: 14px;
    font-weight: 500;
}

/* === 下载操作区域 === */
.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-btn {
    background: #52c41a;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.download-btn:hover {
    background: #73d13d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

.download-btn:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.action-btn {
    background: white;
    color: #595959;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.action-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* === 功能特性区域 === */
.features-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 40px 32px;
    margin-bottom: 40px;
}

.features-title {
    font-size: 1.5em;
    color: #262626;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 24px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #1890ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.1);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
    color: #1890ff;
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: #8c8c8c;
    line-height: 1.6;
}

/* === 响应式设计 === */
@media (max-width: 1024px) {
    .generator-main {
        grid-template-columns: 180px 1fr 280px;
    }
}

@media (max-width: 768px) {
    .hero h1 { 
        font-size: 2em; 
    }
    
    .hero p { 
        font-size: 1em; 
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-links { 
        display: none; 
    }
    
    .lang-switch {
        margin-left: 0;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .cta-buttons { 
        flex-direction: column; 
        align-items: center; 
    }
    
    .generator-main {
        grid-template-columns: 1fr;
    }
    
    .type-selector {
        border-right: none;
        border-bottom: 1px solid #e8eaec;
    }
    
    .type-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .type-btn {
        flex-direction: column;
        gap: 6px;
        padding: 12px 8px;
        text-align: center;
    }
    
    .preview-section {
        border-left: none;
        border-top: 1px solid #e8eaec;
    }
}

/* === 动画效果 === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.generator-card {
    animation: fadeInUp 0.6s ease-out;
}

/* === 实用工具类 === */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
} 