/* ========== 苹果主题风格 - 图生图模块 - 渐进式交互版 ========== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    color: #1d1d1f;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ========== Header 样式 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    color: #0071e3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(0, 113, 227, 0.08);
}

.page-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.022em;
    color: #1d1d1f;
}

.btn-reset {
    background: transparent;
    color: #ff3b30;
    border: 1.5px solid rgba(255, 59, 48, 0.3);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-reset:hover {
    background: rgba(255, 59, 48, 0.08);
    border-color: #ff3b30;
}

.btn-icon {
    font-size: 14px;
}

/* ========== 步骤条样式 ========== */
.steps-bar {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    z-index: 99;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.step-item.active {
    opacity: 1;
}

.step-item.completed {
    opacity: 1;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e5ea;
    color: #86868b;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: #0071e3;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.step-item.completed .step-number {
    background: #34c759;
    color: #fff;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #86868b;
    transition: all 0.3s ease;
}

.step-item.active .step-label {
    color: #1d1d1f;
}

.step-item.completed .step-label {
    color: #1d1d1f;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: #e5e5ea;
    border-radius: 1px;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.step-connector.active {
    background: #0071e3;
}

/* ========== 主容器样式 ========== */
.main-container {
    margin-top: 108px;
    padding: 24px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - 108px);
}

/* ========== Section 通用样式 ========== */
section {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 上传区域 - Hero全屏模式 ========== */
.section-upload {
    margin-bottom: 24px;
}

.upload-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
    transition: all 0.5s ease;
}

.upload-hero.compact {
    min-height: auto;
    display: none;
}

.upload-hero-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.upload-icon-large {
    font-size: 72px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.upload-subtitle {
    font-size: 16px;
    color: #86868b;
    margin-bottom: 32px;
}

.upload-dropzone {
    background: #fff;
    border: 2px dashed rgba(0, 113, 227, 0.3);
    border-radius: 20px;
    padding: 48px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-dropzone:hover {
    border-color: #0071e3;
    background: rgba(0, 113, 227, 0.02);
    transform: scale(1.01);
    box-shadow: 0 8px 32px rgba(0, 113, 227, 0.1);
}

.upload-dropzone.dragover {
    border-color: #0071e3;
    background: rgba(0, 113, 227, 0.05);
    transform: scale(1.02);
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dropzone-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.dropzone-text {
    font-size: 16px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.dropzone-hint {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 24px;
}

.btn-upload-main {
    background: #0071e3;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}

.btn-upload-main:hover {
    background: #0077ed;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

/* ========== 上传区域 - 紧凑模式 ========== */
.upload-compact {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.compact-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.btn-add-more {
    background: transparent;
    color: #0071e3;
    border: 1.5px solid rgba(0, 113, 227, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-more:hover {
    background: rgba(0, 113, 227, 0.06);
    border-color: #0071e3;
}

/* ========== 预览列表 - 新布局支持数量输入 ========== */
.preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

.preview-list::-webkit-scrollbar {
    width: 6px;
}

.preview-list::-webkit-scrollbar-track {
    background: transparent;
}

.preview-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.preview-item {
    position: relative;
    background: #f5f5f7;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.preview-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.preview-item-image-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.preview-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
}

.preview-item-name {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-item-status {
    font-size: 10px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.preview-item-status.generating {
    color: #ff9500;
}

.preview-item-status.completed {
    color: #34c759;
}

.preview-item-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(255, 59, 48, 0.9);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
    z-index: 5;
}

.preview-item:hover .preview-item-delete {
    opacity: 1;
}

.preview-item-delete:hover {
    background: #ff3b30;
    transform: scale(1.1);
}

/* ========== 生成数量控制区域 ========== */
.preview-item-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.count-label {
    font-size: 12px;
    font-weight: 500;
    color: #86868b;
}

.count-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f5f5f7;
    border-radius: 8px;
    overflow: hidden;
}

.count-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #0071e3;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.count-btn:hover {
    background: rgba(0, 113, 227, 0.1);
}

.count-btn:active {
    background: rgba(0, 113, 227, 0.2);
}

.count-btn:disabled {
    color: #c7c7cc;
    cursor: not-allowed;
}

.count-input {
    width: 36px;
    height: 28px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    -moz-appearance: textfield;
}

.count-input::-webkit-outer-spin-button,
.count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.count-input:focus {
    outline: none;
}

/* ========== 参数区域 ========== */
.section-params {
    display: none;
    margin-bottom: 24px;
    animation: slideUp 0.5s ease;
}

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

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

.params-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: #1d1d1f;
}

.params-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.param-group {
    display: flex;
    flex-direction: column;
}

.param-group.full-width {
    grid-column: 1 / -1;
}

.param-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.option-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.option-card {
    position: relative;
    cursor: pointer;
}

.option-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background: #f5f5f7;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.option-card:hover .option-content {
    background: rgba(0, 113, 227, 0.06);
}

.option-card input:checked + .option-content {
    background: rgba(0, 113, 227, 0.08);
    border-color: #0071e3;
    box-shadow: 0 2px 12px rgba(0, 113, 227, 0.15);
}

.option-icon {
    font-size: 24px;
}

.option-name {
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
}

.custom-prompt-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s ease;
    background: #fbfbfd;
    min-height: 80px;
}

.custom-prompt-input:focus {
    outline: none;
    border-color: #0071e3;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.custom-prompt-input::placeholder {
    color: #86868b;
}

.param-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #86868b;
    line-height: 1.4;
}

.btn-generate {
    width: 100%;
    background: linear-gradient(135deg, #0071e3 0%, #0077ed 100%);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.35);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.4);
}

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

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========== 结果区域 ========== */
.section-results {
    display: none;
    animation: slideUp 0.5s ease;
}

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

.results-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 400px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-download {
    background: #34c759;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(52, 199, 89, 0.3);
}

.btn-download:hover {
    background: #30d158;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
}

.progress-bar {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0071e3, #34c759);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 13px;
    font-weight: 600;
    color: #86868b;
    min-width: 50px;
    text-align: right;
}

/* ========== 结果容器 - 分组展示 ========== */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 300px;
}

.result-group {
    background: #f9f9fb;
    border-radius: 16px;
    padding: 16px;
}

.result-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.result-group-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.result-group-info {
    flex: 1;
}

.result-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 2px;
}

.result-group-meta {
    font-size: 12px;
    color: #86868b;
}

.result-group-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    opacity: 0.4;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.placeholder-text {
    font-size: 15px;
    font-weight: 500;
    color: #86868b;
}

.result-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.result-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-item-index {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: #fff;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .main-container {
        padding: 16px;
    }

    .upload-title {
        font-size: 24px;
    }

    .upload-subtitle {
        font-size: 14px;
    }

    .upload-dropzone {
        padding: 32px 20px;
    }

    .params-grid {
        grid-template-columns: 1fr;
    }

    .option-grid {
        grid-template-columns: 1fr 1fr;
    }

    .option-grid.three-cols {
        grid-template-columns: 1fr 1fr;
    }

    .steps-bar {
        padding: 0 12px;
    }

    .step-label {
        display: none;
    }

    .step-connector {
        width: 24px;
    }

    .preview-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-group-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .option-content {
        padding: 12px 8px;
    }

    .option-icon {
        font-size: 20px;
    }

    .option-name {
        font-size: 12px;
    }

    .preview-item-count {
        padding: 8px 10px;
    }

    .count-label {
        font-size: 11px;
    }
}

/* ========== 错误项样式 ========== */
.result-item-error {
    background: #fff5f5;
    border: 2px dashed #ff3b30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.result-item-error:hover {
    transform: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.result-item-error .error-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.result-item-error .error-text {
    font-size: 12px;
    color: #ff3b30;
    font-weight: 500;
}

/* ========== Image Enlarge Modal ========== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.modal-content {
    position: relative;
    z-index: 10000;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: #fff;
    transform: scale(1.1);
}

/* ========== Result Item Enhancements ========== */
.result-item {
    position: relative;
    overflow: visible;
}

.result-item img {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-item-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background-color: rgba(231, 76, 60, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
    z-index: 10;
}

.result-item:hover .result-item-delete {
    opacity: 1;
}

.result-item-delete:hover {
    background-color: rgba(192, 57, 43, 1);
    transform: scale(1.1);
}

.result-item-delete:active {
    transform: scale(0.95);
}

/* Fade out animation for deleted items */
.result-item.deleting {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Empty state for deleted groups */
.result-item-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

.result-item-empty .empty-text {
    color: #6c757d;
    font-size: 14px;
}
/* ========== Single Page Layout Styles ========== */

/* Operation Section - Upload + Prompt */
.operation-section {
    margin: 2rem auto;
    max-width: 1400px;
    padding: 0 1rem;
}

.operation-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Upload Area */
.upload-area {
    display: flex;
    flex-direction: column;
}

.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: #fafafa;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #4CAF50;
    background: #f0f8f0;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

.upload-hint {
    font-size: 14px;
    color: #666;
    margin-bottom: 1rem;
}

.btn-upload {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-upload:hover {
    background: #45a049;
    transform: translateY(-1px);
}

/* Preview Container */
.preview-container {
    margin-top: 1.5rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.btn-add-more {
    background: #2196F3;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-more:hover {
    background: #1976D2;
}

.preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Prompt Area */
.prompt-area {
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.prompt-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.prompt-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.prompt-hint {
    font-size: 13px;
    color: #666;
    margin: 0.75rem 0 1.5rem 0;
    line-height: 1.5;
}

.btn-generate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-generate:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Results Section */
.results-section {
    margin: 2rem auto;
    max-width: 1400px;
    padding: 0 1rem;
}

.results-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-download {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download:hover {
    background: #45a049;
}

/* Responsive */
@media (max-width: 968px) {
    .operation-card {
        grid-template-columns: 1fr;
    }
}
