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

/* 生成按钮加载状态 */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 生成提示卡片 */
.generating-tip {
    margin-bottom: 20px;
}

.generating-tip .tip-card {
    background: #e6f7ff;
    border-color: #91d5ff;
}

.generating-tip .iconfont {
    color: #1890ff;
}

/* 按钮禁用状态 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 模型选择提示样式 */
.model-tips {
    margin-bottom: 24px;
}

.tip-card {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tip-card i {
    color: #52c41a;
    font-size: 18px;
    margin-top: 2px;
}

.tip-content {
    flex: 1;
}

.tip-content strong {
    color: #389e0d;
    font-size: 14px;
}

.tip-content p {
    margin: 8px 0 4px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

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

/* 头部样式 */
.header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1890ff;
    font-size: 20px;
    font-weight: 600;
}

.logo i {
    margin-right: 8px;
    font-size: 24px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    color: #1890ff;
    background-color: #f0f8ff;
}

.nav-item i {
    margin-right: 6px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.username {
    color: #666;
    font-weight: 500;
}

.logout-btn {
    color: #999;
    text-decoration: none;
    font-size: 14px;
}

.logout-btn:hover {
    color: #666;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
}

.btn i {
    margin-right: 6px;
}

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

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

.btn-outline {
    border-color: #d9d9d9;
    color: #666;
}

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

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* 主要内容区域 */
.main {
    min-height: calc(100vh - 64px - 80px);
    padding: 24px 0;
}

/* 首页英雄区域 */
.hero-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
    padding: 80px 0;
    margin-bottom: 80px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 80px;
}

.hero-content > div:first-child {
    flex: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: #666;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-image {
    flex-shrink: 0;
}

/* 功能特色区域 */
.features-section {
    padding: 80px 0;
    background: #fff;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 48px;
}

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

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 12px;
    background: #fafafa;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: #1890ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.feature-icon i {
    font-size: 28px;
    color: #fff;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 12px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* 统计数据区域 */
.stats-section {
    padding: 60px 0;
    background: #f0f8ff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

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

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1890ff;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 16px;
    color: #666;
}

/* 页面头部 */
.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
}

/* 登录提示 */
.login-prompt {
    display: flex;
    justify-content: center;
    margin-top: 80px;
}

.prompt-card {
    text-align: center;
    padding: 48px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.prompt-card i {
    font-size: 48px;
    color: #1890ff;
    margin-bottom: 24px;
}

.prompt-card h3 {
    font-size: 24px;
    color: #262626;
    margin-bottom: 12px;
}

.prompt-card p {
    color: #666;
    margin-bottom: 24px;
}

/* 表单样式 */
.generate-form {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 32px;
}

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

.form-section .section-title {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 20px;
    text-align: left;
}

.optional {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

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

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    text-align: center;
    margin-top: 32px;
}

/* 结果展示 */
.result-section {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.result-header h2 {
    color: #262626;
    font-size: 24px;
}

.result-actions {
    display: flex;
    gap: 12px;
}

.generated-content {
    background: #fafafa;
    border-radius: 8px;
    padding: 24px;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    margin-bottom: 24px;
    white-space: pre-wrap;
}

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

/* 警告提示 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #a8071a;
}

/* 底部样式 */
.footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 24px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: #1890ff;
}

/* AI模型选择器样式 */
.model-selection {
    margin-top: 16px;
}

.model-category {
    margin-bottom: 24px;
}

.model-category:last-child {
    margin-bottom: 0;
}

.model-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-category-title i {
    font-size: 18px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.model-card {
    display: block;
    position: relative;
    cursor: pointer;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    transition: all 0.2s;
}

.model-card:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.model-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.model-card input[type="radio"]:checked + .model-info {
    border-left: 4px solid #1890ff;
    padding-left: 16px;
}

.model-card input[type="radio"]:checked {
    + .model-info .model-name {
        color: #1890ff;
        font-weight: 600;
    }
}

.model-card.free-model input[type="radio"]:checked + .model-info {
    border-left-color: #52c41a;
}

.model-card.free-model input[type="radio"]:checked + .model-info .model-name {
    color: #52c41a;
}

.model-info {
    padding-left: 0;
    transition: all 0.2s;
}

.model-name {
    font-size: 16px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.model-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.model-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.model-badge.free {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.model-badge.paid {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

/* 创作温度滑块样式 */
.form-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #f0f0f0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1890ff;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1890ff;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-value {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

.range-value span {
    font-weight: 600;
    color: #1890ff;
}

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

/* 重新生成表单样式 */
.regenerate-form {
    margin-top: 24px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.regenerate-form h3 {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 16px;
    text-align: center;
}

.regenerate-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.regenerate-form .form-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
        gap: 16px;
    }
    
    .nav {
        gap: 16px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .result-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .result-actions {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}