/* Apple Design System - 左右分栏布局 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Apple 颜色系统 - 浅色主题 */
    --primary: #007AFF;
    --primary-hover: #0056CC;
    --secondary: #8E8E93;
    --success: #34C759;
    --warning: #FF9500;
    
    /* 背景色 */
    --bg-primary: #F2F2F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F8F9FA;
    --bg-glass: rgba(255, 255, 255, 0.8);
    
    /* 文本色 */
    --text-primary: #000000;
    --text-secondary: #3C3C43;
    --text-tertiary: #8E8E93;
    --text-placeholder: #C7C7CC;
    
    /* 边框和阴影 */
    --border-color: rgba(60, 60, 67, 0.12);
    --border-focus: var(--primary);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* 间距系统 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* 深色主题 */
[data-theme="dark"] {
    /* Apple 颜色系统 - 深色主题 */
    --primary: #0A84FF;
    --primary-hover: #409CFF;
    --secondary: #8E8E93;
    --success: #32D74B;
    --warning: #FF9F0A;
    
    /* 背景色 */
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    --bg-glass: rgba(28, 28, 30, 0.8);
    
    /* 文本色 */
    --text-primary: #FFFFFF;
    --text-secondary: #EBEBF5;
    --text-tertiary: #8E8E93;
    --text-placeholder: #48484A;
    
    /* 边框和阴影 */
    --border-color: rgba(84, 84, 88, 0.65);
    --border-focus: var(--primary);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.47059;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 全宽顶部导航栏 */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-2xl);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 主容器 - 左右分栏 */
.app-container {
    display: flex;
    min-height: calc(100vh - 120px);
    max-width: 1400px;
    margin: 0 auto;
}

/* 左侧输入面板 - 严格50% */
.input-panel {
    width: 50%;
    min-width: 50%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--space-lg);
    padding-bottom: var(--space-3xl);
    align-items: stretch;
}

/* 左侧编辑卡片 - 占满高度 */
.input-panel .edit-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.app-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.app-logo {
    width: 80px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    max-height: 40px;
    width: auto;
}

/* 🎯 统一卡片内容区域 */
.card-content {
    padding: var(--space-2xl);
}

/* 输入区域 */
.input-section {
    margin-bottom: var(--space-2xl);
}

.input-row {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.image-upload-area {
    width: 100px;
    min-width: 100px;
}

.upload-zone {
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(0, 122, 255, 0.04);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(0, 122, 255, 0.08);
}

.upload-zone.has-images .upload-content {
    display: none;
}

.upload-zone.has-images {
    padding: var(--space-xs);
    cursor: pointer;
    justify-content: flex-start;
    align-items: flex-start;
    background: var(--bg-tertiary);
}

.upload-zone.has-images:hover {
    background: rgba(0, 122, 255, 0.04);
    border-color: var(--primary);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.upload-icon {
    font-size: 16px;
    opacity: 0.6;
}

.upload-text {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.uploaded-images-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    width: 100%;
}

/* 加载状态 */
.upload-zone.uploading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 11;
}

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

.image-preview {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    width: 80px;
    height: 80px;
}

.image-preview:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    z-index: 5;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview .image-actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    opacity: 0;
    transition: all 0.2s ease;
}

.image-preview:hover .image-actions {
    opacity: 1;
}

.image-preview .btn-small {
    padding: 2px;
    width: 16px;
    height: 16px;
    font-size: 10px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
}

.image-preview .btn-copy:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.image-preview .btn-remove:hover {
    background: #FF3B30;
    color: white;
    transform: scale(1.1);
}

.text-input-area {
    flex: 1;
}

.main-textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    resize: none;
    transition: all 0.2s ease;
    margin-bottom: var(--space-sm);
}

.main-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.main-textarea::placeholder {
    color: var(--text-placeholder);
}

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

.char-count {
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: 'SF Mono', Monaco, monospace;
}

.btn-optimize {
    background: var(--warning);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-optimize:hover:not(:disabled) {
    background: #E68500;
    transform: translateY(-1px);
}

.btn-optimize:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-optimize.optimizing {
    background: var(--primary);
}

/* 按钮内的加载动画 */
.btn-spinner {
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* 参数设置区域 */
.section-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.01em;
}

.param-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.param-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.param-item.full-width {
    grid-column: span 2;
}

.param-item label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.param-item.disabled {
    opacity: 0.5;
}

.param-item.disabled label {
    color: var(--text-tertiary);
}

.param-item.disabled select {
    background-color: var(--bg-secondary);
    cursor: not-allowed;
}

.select-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m7 10 5 5 5-5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
    background-size: 12px;
    padding-right: 40px;
    min-height: 40px;
}

.select-input:hover {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.select-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.text-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-height: 40px;
}

.text-input:hover {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.text-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.text-input::placeholder {
    color: var(--text-placeholder);
}

/* 按钮系统 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-optimize {
    background: var(--warning);
    color: white;
    box-shadow: var(--shadow-sm);
    padding: var(--space-xs) var(--space-md);
    font-size: 13px;
}

.btn-optimize:hover {
    background: #E68500;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--secondary);
}

.btn-large {
    padding: var(--space-lg) var(--space-3xl);
    font-size: 17px;
    font-weight: 600;
    border-radius: var(--radius-lg);
}

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

/* 操作区域 - 紧凑布局 */
.action-section {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    gap: var(--space-md);
}

/* 🎯 统一状态消息样式 */
.status-message {
    font-size: 12px;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-8px);
    margin-top: var(--space-sm);
    text-align: center;
    font-weight: 500;
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

.status-message.success {
    background: rgba(52, 199, 89, 0.1);
    color: #1D8348;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-message.error {
    background: rgba(255, 59, 48, 0.1);
    color: #C0392B;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.status-message.optimizing {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 122, 255, 0.3);
}

/* 隐藏优化状态提示 */
#optimize-status {
    display: none;
}

/* 右侧结果区域 - 严格50% 紧凑布局 */
.results-area {
    width: 50%;
    min-width: 50%;
    background: var(--bg-primary);
    padding: var(--space-lg);
    padding-bottom: var(--space-3xl);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    align-items: stretch;
}

/* 第一个结果卡片 - 占据更多空间 */
.results-area .result-card:first-child {
    flex: 1;
    margin-bottom: var(--space-lg);
    display: flex;
    flex-direction: column;
}

/* 第一个结果卡片的内容区域也要扩展 */
.results-area .result-card:first-child .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 第一个结果卡片的prompt显示区域扩展 */
.results-area .result-card:first-child .prompt-display {
    flex: 1;
}

/* 第二个结果卡片 - 自适应内容高度 */
.results-area .result-card:last-child {
    flex: 0 0 auto;
}

.result-card,
.edit-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}


.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl) var(--space-2xl);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.card-header h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.card-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-minimal {
    background: transparent;
    border: none;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-minimal:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transform: scale(1.05);
}

.btn-minimal:active {
    transform: scale(0.95);
}

/* 🎯 统一Prompt显示样式 */
.prompt-display {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 120px;
}

/* Prompt 内容颜色区分 */
.prompt-display .prompt-url {
    color: var(--text-tertiary);
    opacity: 0.8;
}

.prompt-display .prompt-content {
    color: var(--text-primary);
    font-weight: 500;
}

.prompt-display .prompt-param {
    color: var(--primary);
    font-weight: 600;
}

.prompt-display .prompt-hint {
    color: var(--warning);
    font-weight: 500;
    font-style: italic;
}

/* 🎯 统一参数网格样式 */
.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.param-badge {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
}

.param-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.param-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 底部版权信息 */
.app-footer {
    text-align: center;
    padding: var(--space-lg) var(--space-2xl);
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.app-footer:hover {
    opacity: 0.9;
}

/* 版本更新通知 */
.version-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.version-notification-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 14px;
    font-weight: 500;
}

.version-notification button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.version-notification button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .input-panel {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .param-grid {
        grid-template-columns: 1fr;
    }
    
    .param-item.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .chat-input-area,
    .params-section,
    .action-section,
    .results-area {
        padding: var(--space-lg);
    }
    
    .panel-header {
        padding: var(--space-lg);
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .params-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .input-panel {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-input-area,
    .params-section,
    .action-section {
        padding: var(--space-md);
    }
}

/* 翻译按钮加载动画 */
.translate-loading {
    position: relative;
}

.translate-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.translate-loading svg {
    opacity: 0;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 比例选择器样式 */
.aspect-ratio-wrapper {
    position: relative;
}

.select-with-icon {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-with-icon-input {
    padding-left: 32px !important;
    width: 100%;
    min-width: 120px;
}

.aspect-ratio-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--primary);
    border-radius: 2px;
    display: inline-block;
    opacity: 0.8;
    pointer-events: none;
}

/* 不同比例的图标 */
.aspect-ratio-icon.ratio-1-1 {
    width: 16px;
    height: 16px;
}

.aspect-ratio-icon.ratio-4-3 {
    width: 18px;
    height: 14px;
}

.aspect-ratio-icon.ratio-16-9 {
    width: 20px;
    height: 11px;
}

.aspect-ratio-icon.ratio-9-16 {
    width: 11px;
    height: 20px;
}

.aspect-ratio-icon.ratio-3-2 {
    width: 18px;
    height: 12px;
}

.aspect-ratio-icon.ratio-2-3 {
    width: 12px;
    height: 18px;
}

.aspect-ratio-icon.ratio-custom {
    width: 16px;
    height: 16px;
    background: var(--text-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 2px;
}


/* 自定义下拉菜单样式 */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    font-size: 14px;
    color: var(--text-primary);
}

.custom-select-trigger:hover {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.custom-select-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    color: var(--text-secondary);
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 4px;
    padding: var(--space-sm);
    
    /* 网格布局 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    min-height: 60px;
}

.custom-option:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
}

.custom-option.selected {
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}


/* 触发器中的比例图标 */
.custom-select-trigger .aspect-ratio-icon {
    position: static;
    transform: none;
    margin: 0;
    flex-shrink: 0;
}

/* 选项中的比例图标 */
.custom-option .aspect-ratio-icon {
    position: static;
    transform: none;
    margin: 0;
    flex-shrink: 0;
    opacity: 1;
}

/* 自定义比例输入框 */
.custom-ratio-input {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
    z-index: 101;
    min-width: 200px;
}

.custom-ratio-input input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    text-align: center;
    margin: 0 4px;
}

.custom-ratio-input button {
    padding: 4px 12px;
    margin-left: var(--space-sm);
    font-size: 12px;
}

/* 强制刷新 2025年 8月26日 星期二 13时21分20秒 CST */
