/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --color-primary: #000000;
    --color-text: #1E293B;
    --color-text-muted: #64748B;
    --color-background: #FFFFFF;
    --color-border: #E2E8F0;
    --color-border-hover: #94A3B8;

    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    padding: var(--spacing-xl);
}

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

/* Navigation */
.back-home-link {
    display: inline-block;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.back-home-link:hover {
    color: var(--color-primary);
}

/* Typography */
.app-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: #000;
}

/* Input Section */
.input-section {
    margin-bottom: var(--spacing-lg);
}

.input-container {
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    padding-bottom: 4rem;
    /* Space for bottom controls */
    background: white;
    transition: box-shadow 0.2s;
    min-height: 160px;
}

.input-container:focus-within {
    border-color: var(--color-border-hover);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Controls positioned at bottom */
.input-controls {
    position: absolute;
    bottom: 1rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Thumbnail Preview */
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.preview-item {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: #F8FAFC;
    padding: 2px;
}

.preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.preview-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #E2E8F0;
    color: #64748B;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.preview-delete-btn:hover {
    background: #EF4444;
    color: white;
}

/* Filename tooltip */
.preview-filename {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 20;
}

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

.main-textarea {
    width: 100%;
    border: none;
    resize: none;
    font-size: 1rem;
    font-family: var(--font-body);
    margin-bottom: 0;
    color: var(--color-text);
    outline: none;
    background: transparent;
    flex: 1;
}

.main-textarea::placeholder {
    color: #94A3B8;
}

.controls-left {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    flex-wrap: wrap;
}

.icon-text-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #000;
    font-weight: 500;
    transition: opacity 0.2s;
}

.icon-text-btn:hover {
    opacity: 0.7;
}

.model-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000;
    font-size: 0.95rem;
    font-weight: 500;
}

.model-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-label {
    color: #666;
    font-size: 0.9rem;
}

.model-name {
    color: #000;
    font-weight: 600;
    font-size: 0.95rem;
}


.start-analysis-btn {
    background: #000;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.start-analysis-btn:hover {
    opacity: 0.9;
}

.start-analysis-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Message */
.status-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Prompt Cards */
.prompt-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width, 280px), 1fr));
    gap: 1.5rem;
}

.prompt-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    aspect-ratio: var(--card-aspect-ratio, 9/16);
    height: auto;
    position: relative;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Card Default State */
.card-default-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    color: #000;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
}

.card-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: #000;
}

.edit-btn:hover {
    background-color: #F1F5F9;
}

.generate-btn {
    background: #000;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}

.generate-btn:hover {
    opacity: 0.9;
}

/* Generated Image Styling */
.generated-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.generated-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay Buttons - Vertical Layout on Right Bottom */
.card-hover-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.prompt-card:hover .card-hover-overlay {
    opacity: 1;
    pointer-events: auto;
}

.overlay-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.overlay-icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.overlay-icon-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.overlay-icon-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}


/* Utility */
.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    /* 限制最大高度 */
    display: flex;
    /* Flex布局 */
    flex-direction: column;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 0;
    /* 移除容器Padding */
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    /* 防止Header被压缩 */
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    /* 允许内容区域滚动 */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* 优化后的输入框 */
.modal-textarea {
    width: 100%;
    height: 120px;
    /* 默认高度调小 */
    min-height: 100px;
    max-height: 40vh;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    resize: vertical;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    /* 由Modal Body Gap控制 */
    outline: none;
    background-color: #f9fafb;
    color: #1f2937;
    white-space: pre-wrap;
}

/* 紧凑型参考图上传组件 */
.reference-upload-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 0.5rem;
    gap: 1rem;
}

.ref-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.ref-label {
    font-weight: 500;
    font-size: 0.95rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ref-desc {
    font-size: 0.8rem;
    color: #64748B;
}

.ref-uploader {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.ref-upload-btn {
    width: 100%;
    height: 100%;
    border: 2px dashed #CBD5E1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
    color: #94A3B8;
}

.ref-upload-btn:hover {
    border-color: #000;
    color: #000;
    background: #FAFAFA;
}

.ref-preview-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    display: none;
    /* 默认隐藏 */
}

.ref-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ref-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 10;
}



.save-btn {
    background: #000;
    color: white;
    padding: 0.75rem 1.5rem;
    /* Slightly adjusted padding */
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background-color: #333;
}

/* Header Text Styles */
.modal-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: #64748B;
    margin: 0;
    font-weight: normal;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #94A3B8;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #000;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ensure Main Loader is Centered Column */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

/* Card Specific Loader */
.card-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: var(--radius-xl);
    /* Match card radius */
}

.card-loading-overlay .spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
    border-top-color: #000;
}

.card-loading-text {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 500;
}

/* Identification Report Styles */
.identification-report {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
}

.report-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: #000;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.report-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-field-full {
    grid-column: 1 / -1;
}

.report-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000;
}

.report-input,
.report-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--color-text);
    transition: border-color 0.2s;
}

.report-input:focus,
.report-textarea:focus {
    outline: none;
    border-color: var(--color-border-hover);
}

.report-input-group {
    display: flex;
    gap: 0.5rem;
}

.report-input-group .report-input {
    flex: 1;
}

/* Selling Points List */
.selling-points-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .selling-points-list {
        grid-template-columns: 1fr;
    }
}

.selling-point-item {
    display: flex;
    gap: 0.5rem;
}

.selling-point-cn,
.selling-point-en {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--color-text);
    transition: border-color 0.2s;
}

.selling-point-cn:focus,
.selling-point-en:focus {
    outline: none;
    border-color: var(--color-border-hover);
}

/* Color Picker Group */
.color-picker-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-picker {
    width: 50px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    cursor: pointer;
}

.color-hex {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    color: var(--color-text);
    min-width: 90px;
    text-transform: uppercase;
}

.color-hex:focus {
    outline: none;
    border-color: var(--color-border-hover);
}

/* Design Button (icon-only for "设计") */
.design-btn {
    background: #000;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.design-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.design-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.design-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* Text Content Editor Modal Styles */
.modal-content-wide {
    max-width: 700px;
}

.text-content-editor {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.text-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.text-field-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #000;
}

.optional-label {
    font-size: 0.85rem;
    font-weight: 400;
    color: #64748B;
}

.bilingual-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.text-field-input,
.text-field-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.text-field-input:focus,
.text-field-textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.text-field-textarea {
    resize: vertical;
    min-height: 80px;
}


/* Modal Dynamic Fields */
.modal-fields-container {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-field-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.modal-field-input,
.modal-field-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: all 0.2s;
    background: #F9FAFB;
}

.modal-field-input:focus,
.modal-field-textarea:focus {
    outline: none;
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.modal-field-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Restored .selling-points-editor */
.selling-points-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.selling-point-edit-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #F8FAFC;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
}

.selling-point-edit-item input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    background: white;
}

.selling-point-edit-item input:focus {
    outline: none;
    border-color: #000;
}

/* Layout and Ratio Selector Enhancements */

/* Main Controls Bar Layout - Ensures Start Button is on the far right */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.controls-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Ratio Selector Styles */
.ratio-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000;
}

.ratio-selector-wrapper svg {
    color: #000;
}

.ratio-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ratio-label {
    color: #666;
    font-size: 0.9rem;
}

.ratio-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    outline: none;
    padding: 0;
    text-align: left;
}

.ratio-select:hover {
    opacity: 0.8;
}

/* Ensure controls-right doesn't shrink */
.controls-right {
    flex-shrink: 0;
}

/* Ensure card footer is always visible and at bottom */
.prompt-card .card-footer {
    margin-top: auto;
    /* Push to bottom */
    flex-shrink: 0;
    /* Don't shrink */
    background: white;
    /* Ensure visibility */
    position: relative;
    z-index: 1;
}

/* Responsive adjustments for controls bar */
@media (max-width: 768px) {
    .controls-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .controls-actions {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .controls-right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

/* Ensure proper spacing for different aspect ratios */
@media (min-width: 1200px) {
    .prompt-cards-grid {
        max-width: 100%;
    }
}

/* --- Landing Page Styles --- */

.landing-body {
    background-color: #FFFFFF;
    color: #111827;
    font-family: 'Poppins', sans-serif;
    padding: 0;
    margin: 0;
}

/* Nav */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #4B5563;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #000;
}

.nav-cta {
    background: #000;
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.nav-cta:hover {
    opacity: 0.9;
}

/* Hero */
.landing-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #4B5563;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.hero-btn-primary {
    background: #000;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
}

.hero-btn-secondary {
    background: transparent;
    color: #111827;
    padding: 1rem 2rem;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}

.hero-btn-secondary:hover {
    background-color: #F9FAFB;
}

/* Hero Visual Grid */
.hero-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
    height: 400px;
}

.grid-item {
    background: #F3F4F6;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.demo-card {
    font-weight: 700;
    color: #9CA3AF;
    font-size: 1.5rem;
}

.item-1 {
    grid-column: 1;
    grid-row: 1 / 3;
    background: #EEF2FF;
}

/* Tall item */
.item-2 {
    background: #ECFEFF;
}

.item-3 {
    background: #FDF4FF;
}

.item-4 {
    background: #FFFBEB;
}

/* Features */
.landing-features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 4rem;
}

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

.feature-card {
    padding: 2rem;
    border-radius: 1.5rem;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    text-align: left;
    transition: box-shadow 0.2s;
}

.feature-card:hover {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #F3F4F6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #111827;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

/* Workflow */
.landing-workflow {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    background: #F9FAFB;
    border-radius: 2rem;
    margin-bottom: 4rem;
}

.workflow-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.step-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.step-number {
    width: 64px;
    height: 64px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 4px solid #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

.step-card p {
    color: #6B7280;
    line-height: 1.6;
    max-width: 200px;
    font-size: 0.95rem;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: #E5E7EB;
    margin-top: 32px;
    /* (64px height / 2) */
    z-index: 1;
}

@media (max-width: 768px) {
    .workflow-steps {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .step-connector {
        width: 2px;
        height: 40px;
        margin-top: 0;
        margin-left: 0;
    }
}

/* Footer */
.landing-footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid #E5E7EB;
    color: #6B7280;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .landing-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 4rem 1.5rem;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .nav-links {
        display: none;
        /* Hide nav links on mobile for simplicity */
    }

    .hero-image-grid {
        height: 300px;
    }
}

/* Card Groups */
.card-group-section {
    margin-bottom: 2rem;
}

.group-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-left: 0.75rem;
    border-left: 4px solid #1e293b;
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width, 280px), 1fr));
    gap: 1.5rem;
}

/* Logo Card Special Sizing */
.logo-card-item {
    width: var(--logo-card-width, 100%) !important;
    aspect-ratio: 1/1 !important;
}

/* Session Restoration Banner */
.session-restore-banner {
    background: #f8fafc;
    /* Very light gray/white */
    border: 1px solid #e2e8f0;
    /* Light gray border */
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.3s ease-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.session-restore-banner.hidden {
    display: none !important;
}

.session-restore-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #334155;
    /* Slate 700 - Dark gray/blackish */
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
}

.session-selector {
    padding: 0.4rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    background: white;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
    max-width: 300px;
}

.session-selector:hover {
    border-color: #94a3b8;
}

.session-selector:focus {
    outline: none;
    border-color: #0f172a;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

.restore-icon {
    font-size: 1.2rem;
    color: #0f172a;
    /* Slate 900 - Black */
}

.session-restore-actions {
    display: flex;
    gap: 0.5rem;
}

.restore-btn {
    background: #f97316;
    /* Orange 500 */
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.restore-btn:hover {
    background: #ea580c;
    /* Orange 600 */
}

.discard-btn {
    background: transparent;
    color: #64748b;
    /* Slate 500 */
    border: 1px solid #cbd5e1;
    padding: 0.4rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.discard-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

/* History Navigation Buttons */
.history-navigation {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    /* 恢复默认隐藏 */
    transition: opacity 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.generated-view:hover .history-navigation {
    opacity: 1;
    pointer-events: auto;
}

.history-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.7);
    /* 黑色半透明背景 */
    backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-btn:hover:not(.disabled) {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.history-btn:active:not(.disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.history-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.5);
}

.history-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* 强制纯白色图标 */
}

/* Image Preview Modal */
.image-preview-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}

.image-preview-modal.active {
    display: flex;
}

.image-preview-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
}