/* ============================================
   设置弹窗样式
   ============================================ */
.gen-toolbar {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.gen-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
}

.gen-settings-btn:hover {
    border-color: #8b2e2e;
    color: #8b2e2e;
    background: rgba(139,46,46,.06);
}

.gen-settings-btn svg {
    width: 18px;
    height: 18px;
}

/* 遮罩层 */
.gen-settings-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 200ms ease;
}

.gen-settings-overlay.is-open {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 弹窗面板 */
.gen-settings-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 300ms ease;
}

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

.gen-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.gen-settings-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.gen-settings-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    color: #64748b;
    cursor: pointer;
    transition: all 150ms ease;
}

.gen-settings-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.gen-settings-close svg {
    width: 18px;
    height: 18px;
}

/* 设置区块 */
.gen-settings-section {
    margin-bottom: 28px;
}

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

.gen-settings-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}

/* 比例网格 */
.gen-ratio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 16px;
}

.gen-ratio-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 12px;
    min-width: 52px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 12px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
}

.gen-ratio-btn:hover {
    background: #ffffff;
    color: #0f172a;
}

.gen-ratio-btn svg {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: opacity 150ms ease;
}

.gen-ratio-btn:hover svg {
    opacity: 1;
}

.gen-ratio-btn--active {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gen-ratio-btn--active svg {
    opacity: 1;
    stroke: #8b2e2e;
}

/* 分辨率按钮组 */
.gen-resolution-group {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.gen-resolution-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
}

.gen-resolution-btn:hover {
    color: #0f172a;
}

.gen-resolution-btn--active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 响应式 */
@media (max-width: 640px) {
    .gen-settings-panel {
        padding: 24px;
        width: 95%;
    }
    
    .gen-ratio-grid {
        gap: 4px;
        padding: 6px;
    }
    
    .gen-ratio-btn {
        min-width: 44px;
        padding: 8px 6px;
    }
    
    .gen-ratio-btn svg {
        width: 20px;
        height: 20px;
    }
}
