/* frontend/css/style.css - 现代化版本 + 布局优化 + 交互增强 */

/* 面包屑导航样式 */
.breadcrumb {
    background: rgba(26, 34, 58, 0.8);
    padding: 12px 24px;
    margin: 0 auto;
    max-width: 1366px;
    border-radius: 12px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(45, 54, 80, 0.3);
}

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: #667eea;
    font-weight: bold;
}

.breadcrumb-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.breadcrumb-link:hover {
    color: #00CFFF;
    text-decoration: underline;
}

.breadcrumb-current {
    color: #AAB4D4;
    font-weight: 500;
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 8px 16px;
        margin-bottom: 12px;
    }
    
    .breadcrumb-list {
        font-size: 0.85em;
        gap: 6px;
    }
    
    .breadcrumb-item:not(:last-child)::after {
        margin-left: 6px;
    }
}

/* 基本重置和全局样式 */
body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    background: #151c29 url('https://assets-global.website-files.com/63e4e7e7e0e92e1e7b6e7e7e/63e4e7e7e0e92e1e7b6e7e7e_circuit-bg.svg') repeat;
    color: #AAB4D4;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-size: 1em;
}

html, body {
    overflow-x: hidden;
}

.container {
    width: 98%;
    max-width: 1366px;
    margin: -48px auto 0 auto;
    background: transparent;
    color: #AAB4D4;
    padding: 44px 48px;
    border-radius: 28px;
    box-shadow: none;
    backdrop-filter: none;
    border: none;
    position: relative;
    top: 0;
    font-size: 1em;
}

header {
    text-align: center;
    margin-bottom: 40px; /* 增加底部间距 */
    padding-bottom: 25px; /* 增加底部内边距 */
    border-bottom: 2px solid rgba(102, 126, 234, 0.15);
}

header h1 {
    /* 渐变色标题 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px; /* 增加间距 */
    font-size: 2.2em; /* 稍微增大字体 */
    font-weight: 700;
}

header p {
    font-size: 1.15em; /* 稍微增大字体 */
    color: #666;
    margin: 0;
}

main {
    /* 使用CSS Grid布局优化 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

/* 输入区域 - 卡片化设计 */
.input-section, .output-section {
    background: #1A223A;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,207,255,0.10);
    padding: 28px 24px;
    margin-bottom: 24px;
    border: 1.5px solid #2D3650;
    color: #AAB4D4;
}

.input-section h2, .output-section h2 {
    color: #AAB4D4;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 0;
    letter-spacing: 1px;
}

/* 新增：示例展示区域 */
.examples-container {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.05);
}

.examples-title {
    margin: 0 0 15px 0;
    font-weight: 600;
    color: #667eea;
    font-size: 1.05em;
}

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

.example-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.example-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.example-card:hover img {
    transform: scale(1.05);
}

.example-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    font-size: 0.9em;
    font-weight: 500;
}

/* 提示词工具样式 */
/*
.prompt-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-group label {
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}

.tool-select {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.95em;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
*/

/* 负面提示词样式 */
.negative-prompt,
.options,
.image-options {
    background: #232B3E;
    border-radius: 12px;
    padding: 0 0 0 0; /* 移除原有内边距，左右对齐 */
    border: 1px solid #2D3650;
    margin-bottom: 18px;
    color: #E3E6F3;
}

.negative-prompt input,
.image-options select,
.image-options input[type="number"] {
    color: #222;
    background: #fff;
}

/* 主文本输入框样式 */
textarea#text-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d9e6; /* 与其他输入框统一 */
    border-radius: 8px;
    font-size: 1em;
    line-height: 1.5;
    min-height: 140px; /* 增大最小高度，约等于8行文本 */
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 10px; /* 与下方提示的间距 */
}

textarea#text-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .prompt-tools {
        grid-template-columns: 1fr;
    }

    .tool-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .examples-grid {
        grid-template-columns: 1fr;
    }

    .example-card {
        aspect-ratio: 16/9;
    }
}

/* 选项区域 - 卡片化分组 */
.options {
    margin-top: 18px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #232B3E !important;
    padding: 18px 18px 12px 18px;
    border-radius: 12px;
    border: 1px solid #2D3650;
    flex-wrap: wrap;
    color: #E3E6F3;
}
.options label {
    margin-right: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #E3E6F3 !important;
    font-size: 1.05em;
}

.options input[type="radio"] {
    margin-right: 5px; /* 增加间距 */
    cursor: pointer;
    transform: scale(1.1); /* 稍微放大单选按钮 */
}

/* 新增：类型提示 */
.type-hint {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
    margin-left: 20px;
    padding: 4px 8px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

/* 图片选项区域 - 独立卡片 */
.image-options {
    background: #232B3E !important;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2D3650;
    margin-bottom: 25px;
    color: #E3E6F3;
}

.image-options h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #AAB4D4;
    font-weight: 600;
    font-size: 1.1em;
}

.image-options > div {
    margin-bottom: 15px; /* 统一间距 */
}

.image-options > div:last-child {
    margin-bottom: 0;
}

.image-options label {
    font-weight: 500;
    color: #E3E6F3 !important;
    margin-right: 10px;
    font-size: 1.05em;
}

.image-options select,
.image-options input[type="number"] {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    margin-right: 10px;
}

.image-options select:focus,
.image-options input[type="number"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.image-options input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

/* 自定义尺寸容器 */
#custom-dimensions-container {
    background: rgba(240, 244, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    margin-top: 10px;
}

button#generate-button {
    background: linear-gradient(90deg, #0099E6 0%, #005F99 100%);
    color: #fff;
    font-size: 1.18em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    padding: 14px 0;
    width: 100%;
    margin-top: 22px;
    box-shadow: 0 2px 8px rgba(0,207,255,0.10);
    transition: background 0.2s, box-shadow 0.2s;
    letter-spacing: 2px;
}

button#generate-button:hover, button#generate-button:focus {
    background: linear-gradient(90deg, #00CFFF 0%, #4F8CFF 100%);
    box-shadow: 0 4px 16px rgba(0,207,255,0.18);
    cursor: pointer;
}

/* 输出区域 - 卡片化设计 */
.output-section {
    background: #232B45;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,207,255,0.10);
    padding: 28px 24px;
    margin-top: 0; /* 移除margin，使用grid gap */
    padding-top: 25px; /* 移除之前的border-top样式 */
    border-top: none;
    color: #AAB4D4;
}

/* 新增：结果状态提示 */
.result-status {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.status-icon {
    font-size: 1.1em;
}

.status-text {
    font-size: 0.95em;
    color: #667eea;
    font-weight: 500;
}

.result-container {
    margin-top: 20px; /* 增加间距 */
    padding: 25px; /* 增加内边距 */
    background: linear-gradient(135deg, #ffffff 0%, #fbfcff 100%);
    border-radius: 16px; /* 更大圆角 */
    border: 1px solid rgba(102, 126, 234, 0.1);
    /* 现代化阴影 */
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.1);
    /* 固定容器最大尺寸，防止图片撑大卡片 */
    max-width: 100%;
    overflow: hidden;
}

/* 图片容器优化 - 防止大图撑大卡片 */
.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.image-container img#generated-image {
    /* 限制图片最大显示尺寸 */
    max-width: 100%;
    max-height: 500px; /* 限制最大高度 */
    width: auto;
    height: auto;
    border-radius: 12px; /* 更大圆角 */
    display: block;
    margin: 0 auto;
    border: 1px solid rgba(102, 126, 234, 0.2);
    /* 图片阴影 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    /* 平滑过渡效果 */
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 图片悬停效果 */
.image-container img#generated-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 多图片布局优化 */
.image-container .image-grid {
    display: grid;
    gap: 15px;
    width: 100%;
    max-width: 100%;
}

/* 1张图片 */
.image-container .image-grid.single {
    grid-template-columns: 1fr;
    place-items: center;
}

/* 2张图片 */
.image-container .image-grid.double {
    grid-template-columns: 1fr 1fr;
}

/* 4张图片 */
.image-container .image-grid.quad {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* 多图片时的单个图片样式 */
.image-container .image-grid img {
    max-width: 100%;
    max-height: 250px; /* 多图时限制更小的高度 */
    width: auto;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-container .image-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 图片信息提示 */
.image-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    font-size: 0.9em;
    color: #667eea;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

/* 图片操作按钮 */
.image-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.image-action-btn {
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    font-size: 0.85em;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.image-action-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-1px);
}

.audio-container audio#generated-audio {
    width: 100%;
    margin-bottom: 15px; /* 增加间距 */
    border-radius: 12px;
}

.audio-container a#download-audio-link {
    display: inline-block;
    margin-top: 15px; /* 增加间距 */
    padding: 12px 24px; /* 增大按钮 */
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px; /* 更大圆角 */
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1.05em;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.audio-container a#download-audio-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}

/* 加载指示器 */
/*
.spinner {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
*/

/* 现代化跳动点加载器样式 */
.bouncing-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px; /* 增加高度 */
}

.bouncing-loader > div {
    width: 16px; /* 增大尺寸 */
    height: 16px;
    margin: 0 8px; /* 增加间距 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    animation: bouncing-loader 1.4s infinite ease-in-out both;
    /* 现代化阴影 */
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
}

.bouncing-loader > div:nth-child(1) {
    animation-delay: -0.32s;
}

.bouncing-loader > div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bouncing-loader {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.6;
    }
    40% {
        transform: scale(1.3); /* 增大跳动幅度 */
        opacity: 1;
    }
}

/* .loading 容器本身样式，用于结果区域内的加载指示 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px; /* 增加内边距 */
    background: linear-gradient(135deg, #ffffff 0%, #fbfcff 100%);
    border-radius: 16px; /* 更大圆角 */
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.1);
}

/* 为 .loading 内的文字单独设置样式 */
.loading p {
    margin-top: 15px; /* 增加间距 */
    font-size: 1.15em; /* 增大字体 */
    font-weight: 500;
    color: #667eea;
    margin-bottom: 0;
}

/* 错误提示 */
.error-text {
    color: #e74c3c;
    background: linear-gradient(135deg, #fdecec 0%, #fdf2f2 100%);
    border: 2px solid #e74c3c;
    padding: 20px 25px; /* 增加内边距 */
    border-radius: 12px; /* 更大圆角 */
    margin-top: 20px; /* 增加间距 */
    text-align: center;
    font-weight: 500;
    font-size: 1.05em;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.15);
}

footer {
    text-align: center;
    margin-top: 30px; /* 调整间距 */
    padding-top: 25px; /* 增加内边距 */
    border-top: 2px solid rgba(102, 126, 234, 0.15);
    font-size: 0.95em; /* 稍微增大字体 */
    color: rgba(255, 255, 255, 0.8);
}

/* 响应式调整 - 增强版 */
@media (max-width: 900px) {
    .container {
        width: 99%;
        padding: 18px 16px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 8px 2vw;
        border-radius: 0;
        width: 100vw;
        max-width: 100vw;
        margin: 0;
    }
    .input-section, .output-section, .features-section, .image-options, .options, .negative-prompt {
        padding: 16px 8px;
        border-radius: 10px;
        margin-bottom: 14px;
    }
    /* 输入区与按钮 */
    #text-input, #negative-prompt {
        font-size: 1.08em;
        padding: 10px 8px;
        min-height: 48px;
        width: 100%;
        box-sizing: border-box;
    }
    .quick-actions, .examples-quickfill {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }
    .quick-actions button, .example-btn, button#generate-button {
        width: 100%;
        font-size: 1.08em;
        min-height: 44px;
        margin-bottom: 6px;
        border-radius: 8px;
    }
    button#generate-button {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        width: 100vw;
        z-index: 1000;
        border-radius: 0;
        font-size: 1.15em;
        min-height: 52px;
    }
    /* 导航栏与菜单 */
    .navbar {
        flex-direction: row;
        padding: 0 8px;
        height: 48px;
    }
    .navbar-menu {
        display: none !important;
    }
    .navbar-left .logo-img {
        height: 28px;
        margin-right: 6px;
    }
    .site-name {
        font-size: 1.08em;
    }
    .navbar-right {
        padding: 0 4px;
    }
    /* 弹窗全屏化 */
    .modal-content {
        width: 98vw !important;
        min-width: unset !important;
        max-width: 98vw !important;
        min-height: 60vh;
        border-radius: 12px;
        padding: 18px 8px;
        left: 1vw !important;
        top: 2vh !important;
    }
    .modal-content h2 {
        font-size: 1.15em;
    }
    /* 结果区与图片 */
    .image-container img, .image-grid img {
        max-width: 100vw !important;
        width: 100vw !important;
        height: auto !important;
        border-radius: 8px;
    }
    .audio-container audio {
        width: 100% !important;
    }
    /* 特性区块 */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .feature-card {
        padding: 12px 6px;
        border-radius: 8px;
        font-size: 1em;
    }
    /* Footer适配 */
    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 0;
    }
    .footer-left, .footer-center, .footer-right {
        text-align: left;
        font-size: 0.98em;
        margin: 0 0 4px 0;
    }
    .footer-icon {
        width: 28px;
        height: 28px;
        margin-right: 8px;
    }
    .footer-link {
        font-size: 1em;
        margin-bottom: 2px;
    }
}

/* 语言切换按钮样式 */
.language-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-right: 18px;
}
.lang-btn {
    background: transparent;
    color: #AAB4D4;
    border: 2px solid #2D3650;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.lang-btn:hover {
    background: #232B45;
    color: #00CFFF;
    border-color: #00CFFF;
}
.lang-btn.active, .lang-btn.selected {
    background: #00CFFF;
    color: #181f2e;
    border-color: #00CFFF;
}

.prompt-tip {
    font-size: 0.9em;
    color: #667eea; /* 深色提示，更醒目 */
    font-style: italic;
    margin: 18px 0; /* 调整上下间距 */
    padding: 10px 15px; /* 调整内边距 */
    background: rgba(102, 126, 234, 0.08); /* 更淡的背景 */
    border-radius: 8px;
    text-align: left; /* 确保左对齐 */
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.examples-quickfill {
    margin-bottom: 18px; /* 与下方输入框的间距 */
    display: flex; /* 使用flex布局 */
    flex-wrap: wrap; /* 允许换行 */
    gap: 10px; /* 按钮之间的间距 */
    align-items: center; /* 垂直居中对齐 */
}

.examples-quickfill .examples-label {
    color: #00CFFF;
    font-weight: bold;
    font-size: 1.13em;
    margin-bottom: 6px;
    display: inline-block;
    letter-spacing: 1px;
    vertical-align: middle;
}

.example-btn {
    /* 现代化渐变按钮 */
    background: #10182A;
    color: #00CFFF;
    padding: 10px 28px;
    border: 2px solid #00CFFF;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    /* min-width: auto;  由下方 flex-basis 和 min-width 控制 */
    flex-shrink: 0; /* 防止按钮被过度压缩 */
    flex-grow: 1; /* 允许按钮增长以填充空间 */
    flex-basis: 140px; /* 建议的基础宽度 */
    min-width: 110px; /* 确保按钮不会太窄 */
    text-align: center; /* 文本居中 */
}

.example-btn:hover {
    background: #00CFFF;
    color: #10182A;
}

.quick-actions {
    display: flex;
    gap: 12px; /* 按钮之间的间距调整 */
    margin: 18px 0; /* 上下间距 */
    justify-content: flex-start; /* 默认左对齐 */
    flex-wrap: wrap; /* 允许换行 */
}

.quick-actions button {
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent; /* 统一边框处理 */
    flex-grow: 0; /* 默认不拉伸 */
    flex-shrink: 0; /* 默认不压缩 */
}

/* 清空按钮 */
#clear-btn:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

/* 为三个快捷按钮设置flex-basis，使其在空间足够时宽度一致 */
#clear-btn, #optimize-btn, #random-btn {
    flex-basis: calc(33.333% - 8px); /* 减去gap的影响，(12px * 2 / 3) */
    text-align: center; /* 确保文本居中 */
    min-width: 100px; /* 保证一个最小的可点击宽度 */
}

/* 智能优化按钮 */
.inspiration-gallery {
    margin-top: 28px;
    background: rgba(255,255,255,0.7);
    border-radius: 14px;
    padding: 18px 12px 12px 12px;
    border: 1px solid rgba(102, 126, 234, 0.12);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.05);
}
.inspiration-title {
    margin: 0 0 14px 0;
    font-weight: 600;
    color: #764ba2;
    font-size: 1.08em;
}
.inspiration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.inspiration-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
}
.inspiration-card:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.18);
    transform: translateY(-2px) scale(1.03);
}
.inspiration-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}
.inspiration-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 0;
    background: linear-gradient(to top, rgba(118,75,162,0.85), transparent);
    color: #fff;
    font-size: 0.95em;
    font-weight: 500;
    text-align: center;
    letter-spacing: 1px;
}

/* 顶部导航栏 */
.navbar {
    width: 100%;
    min-width: 0;
    background: #10182A;
    color: #AAB4D4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 72px;
    border-radius: 0;
    box-shadow: none;
    font-size: 1.18em;
    margin-bottom: 0;
    position: relative;
    z-index: 20;
}
.navbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}
.site-name {
    font-size: 1.7em;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #e0e6f8;
    margin-left: 6px;
}
.navbar-menu {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0 0 0 32px;
    padding: 0;
}
.navbar-menu li a {
    color: #AAB4D4;
    text-decoration: none;
    font-size: 1.08em;
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.2s;
    padding: 2px 6px;
}
.navbar-menu li a:hover {
    color: #00CFFF;
}
.navbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 32px;
    margin-right: 0; /* 原为40px，改为0，整体左移 */
}
.login-btn {
    background: transparent;
    color: #00CFFF;
    border: none; /* 去除蓝色外边框 */
    border-radius: 10px;
    padding: 10px 32px;
    font-size: 1.08em;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: none; /* 去除按钮阴影 */
}
.login-btn:hover {
    background: #00CFFF;
    color: #181f2e;
    box-shadow: 0 4px 16px rgba(0,207,255,0.18);
}
.highlight-btn {
    border: 2px solid #00CFFF;
    color: #00CFFF;
    background: transparent;
    font-weight: 800;
}
@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 0 12px;
        border-radius: 0 0 14px 14px;
    }
    .navbar-menu {
        gap: 18px;
        margin: 0;
        padding: 0;
    }
    .login-btn {
        padding: 8px 18px;
        font-size: 1em;
    }
    .site-name {
        font-size: 1.2em;
    }
}

/* 主视觉区 */
.hero-section {
    width: 100%;
    min-width: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 0 32px 0;
    position: relative;
    z-index: 1;
}
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #AAB4D4;
    max-width: 700px;
    margin: 0 auto;
    padding: 48px 32px 40px 32px;
    /* 移除背景、边框、圆角、阴影 */
    background: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
}
.hero-logo {
    font-size: 5em;
    margin-bottom: 18px;
    color: #00CFFF;
    display: block;
}
.hero-title {
    font-size: 2.8em;
    font-weight: bold;
    color: #bfc7e6;
    letter-spacing: 2px;
    margin: 0;
    text-align: left;
}
.hero-subtitle {
    font-size: 1.25em;
    font-weight: 400;
    margin-top: 12px;
    margin-bottom: 28px;
    color: #AAB4D4;
}
.hero-tags {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
}
.tag, .tag-free, .tag-unlimited, .tag-no-login {
    display: inline-block;
    background: #262b35;
    color: #e0e6f6 !important;
    border-radius: 18px;
    padding: 6px 22px;
    font-size: 1em;
    font-weight: 500;
    margin-right: 10px;
    margin-bottom: 4px;
    border: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}
.tag:last-child { margin-right: 0; }
.tag:hover, .tag-free:hover, .tag-unlimited:hover, .tag-no-login:hover {
    border-color: #00CFFF;
    color: #00CFFF !important;
    cursor: pointer;
}

/* 主要特性区块 */
.features-section {
    margin: 48px 0 32px 0;
    text-align: center;
}
.features-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 32px;
    background: linear-gradient(90deg, #ffb86c 0%, #ff6e6e 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 28px;
    justify-items: center;
}
.feature-card {
    background: rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(24,18,30,0.10);
    padding: 32px 18px 24px 18px;
    color: #fff;
    min-height: 180px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1.5px solid rgba(255,255,255,0.13);
}
.feature-card:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 8px 32px rgba(255,184,108,0.18);
}
.feature-icon {
    font-size: 2.2em;
    margin-bottom: 12px;
}
.feature-card h3 {
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 0;
}
.feature-card p {
    font-size: 0.98em;
    color: #ffe6c7;
    margin: 0;
}

/* 生成器区块卡片化升级 */
.input-section, .output-section {
    background: #232B45;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,207,255,0.10);
    padding: 28px 24px;
    margin-bottom: 24px;
    border: 1.5px solid #2D3650;
    color: #AAB4D4;
}

.logo-img {
    height: 38px;
    width: 38px;
    border-radius: 8px;
    margin-right: 10px;
    vertical-align: middle;
    box-shadow: none;
    background: transparent;
}

.hero-logo-img {
    height: 120px;
    width: 120px;
    border-radius: 24px;
    margin-bottom: 18px;
    box-shadow: none;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
}

.hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 0;
}
.hero-logo-img {
    width: 72px;
    height: 72px;
    margin-right: 0;
    display: block;
}
.hero-title {
    font-size: 2.8em;
    font-weight: bold;
    color: #bfc7e6;
    letter-spacing: 2px;
    margin: 0;
}

.input-section textarea,
.input-section input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border-radius: 10px;
    font-size: 1.1em;
}
.input-section .quick-actions,
.input-section .negative-prompt,
.input-section .prompt-tip {
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}
.input-section .quick-actions {
    display: flex;
    gap: 12px;
    margin: 18px 0 18px 0;
}
.input-section .quick-actions button {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
}
.input-section .prompt-tip {
    margin: 18px 0 0 0;
    padding: 8px 0;
}
.input-section .examples-quickfill {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 18px 0;
}
.input-section .examples-quickfill .example-btn {
    min-width: 160px;
}

.lang-select {
    background: transparent;
    color: #AAB4D4;
    border: 2px solid #2D3650;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    outline: none;
    margin-right: 0;
    min-width: 90px;
    padding-right: 28px;
}
.lang-select:focus, .lang-select:hover {
    background: #232B45;
    color: #00CFFF;
    border-color: #00CFFF;
}
.lang-select option {
    background: #232B45;
    color: #AAB4D4;
}

.footer-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 60px 0 40px 0;
    background: none;
    font-size: 1.13em;
}
.footer-left {
    color: #AAB4D4;
    font-size: 1.08em;
    letter-spacing: 1px;
    min-width: 220px;
    text-align: left;
}
.footer-center {
    display: flex;
    gap: 28px;
    align-items: center;
    min-width: 180px;
    justify-content: center;
}
.footer-icon {
    display: inline-block;
    transition: transform 0.2s;
    line-height: 1;
}
.footer-icon:hover {
    transform: scale(1.18) translateY(-2px);
}
.footer-right {
    color: #00CFFF;
    text-align: left;
    min-width: 220px;
}
.footer-link {
    color: #00CFFF;
    text-decoration: none;
    font-size: 1.08em;
    display: inline-block;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.footer-link:hover {
    color: #AAB4D4;
    text-decoration: underline;
}
@media (max-width: 900px) {
    .footer-grid {
        flex-direction: column;
        gap: 24px;
        padding: 40px 0 24px 0;
    }
    .footer-left, .footer-right {
        min-width: unset;
        text-align: center;
    }
    .footer-center {
        min-width: unset;
    }
}

/* 关于弹窗样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(21,28,41,0.85);
  backdrop-filter: blur(2px);
}
.modal-content {
  background: #1A223A;
  margin: 7% auto;
  padding: 48px 44px 36px 44px;
  border: 1.5px solid #2D3650;
  border-radius: 22px;
  width: 98%;
  max-width: 820px;
  color: #AAB4D4;
  box-shadow: 0 8px 32px rgba(0,207,255,0.10);
  position: relative;
  animation: modal-fade-in 0.3s;
  font-size: 1.18em;
}
.modal-content h2 {
  margin-top: 0;
  color: #667eea;
  font-size: 1.7em;
  font-weight: 700;
}
.modal-content p, .modal-content ul, .modal-content div {
  font-size: 1.18em;
  line-height: 2;
  color: #AAB4D4;
}
.close {
  color: #AAB4D4;
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 1.8em;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}
.close:hover {
  color: #00CFFF;
}
@keyframes modal-fade-in {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  display: block;
  font-size: 1.18em;
  font-weight: bold;
  color: #AAB4D4;
  margin: 22px 0 10px 0;
  letter-spacing: 1px;
}

.examples-label {
  color: #AAB4D4;
  font-size: 1em;
  font-weight: normal;
  margin-bottom: 6px;
  display: inline-block;
  letter-spacing: 0.5px;
  vertical-align: middle;
  opacity: 0.85;
}

#negative-prompt {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    font-size: 1.1em;
    line-height: 1.5;
    margin-top: 8px;
    margin-bottom: 0;
    box-sizing: border-box;
    background: #fff;
    color: #222;
    transition: border-color 0.3s, box-shadow 0.3s;
}
#negative-prompt:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

@media (max-width: 600px) {
    .hero-row {
        gap: 10px;
    }
    .hero-logo-img {
        width: 48px;
        height: 48px;
    }
    .hero-title {
        font-size: 1.5em;
    }
}

.testimonial-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}
.testimonial-cards {
  display: flex;
  flex-direction: row;
  gap: 18px;
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
  /* overflow-x: auto; 由外层包裹隐藏 */
  padding: 32px 0 38px 0;
  scroll-snap-type: none;
}
.testimonial-card {
  background: #262b35;
  border-radius: 14px;
  box-shadow: 0 2px 16px #0003;
  padding: 22px 26px;
  min-width: 320px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: box-shadow 0.3s;
  margin: 0 0;
}
.testimonial-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 10px;
  object-fit: cover;
}
.testimonial-card .role {
  color: #aab4d4;
  font-size: 0.98em;
  margin-bottom: 4px;
}
.testimonial-card .rating {
  color: #FFD700;
  font-size: 1.2em;
  position: absolute;
  top: 18px;
  right: 18px;
}
.testimonial-card p[data-i18n^="testimonials.user"] {
  color: #e0e6f6;
  font-size: 1.05em;
  text-align: center;
  margin-top: 10px;
}
.testimonial-carousel-fade {
  pointer-events: none;
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
}
.testimonial-carousel-fade.left {
  left: 0;
  background: linear-gradient(to right, #151c29 80%, transparent);
}
.testimonial-carousel-fade.right {
  right: 0;
  background: linear-gradient(to left, #151c29 80%, transparent);
}

/* 新页面样式 */
.about-section, .services-section, .contact-section {
  background: #1A223A;
  border-radius: 16px;
  padding: 40px;
  margin: 40px 0;
  border: 1px solid #2D3650;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.about-section h2, .services-section h2, .contact-section h2 {
  color: #00CFFF;
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 1px;
}

.about-content, .services-content, .contact-content {
  color: #AAB4D4;
  font-size: 1.18em;
  line-height: 1.8;
  text-align: justify;
}

.about-content a, .services-content a, .contact-content a {
  color: #00CFFF;
  text-decoration: none;
  transition: color 0.3s;
}

.about-content a:hover, .services-content a:hover, .contact-content a:hover {
  color: #667eea;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .about-section, .services-section, .contact-section {
    padding: 24px;
    margin: 24px 0;
  }
  
  .about-section h2, .services-section h2, .contact-section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
  }
  
  .about-content, .services-content, .contact-content {
    font-size: 1.1em;
    line-height: 1.7;
  }
} 